discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with NSTextViews


From: Nicola Pero
Subject: Re: Problems with NSTextViews
Date: Sun, 28 Jan 2001 20:56:03 +0000 (GMT)

    Philippe> Hi, I have the problem, that when I use textviews which
    Philippe> become bigger by the time, the scroller does not appear
    Philippe> and thus you are not able to see the complete content of
    Philippe> the textview.

    Philippe> I am using the latest CVS code. Is this a problem of
    Philippe> mine (the way I initialise the textviews?) or is this a
    Philippe> bug in GNUstep?

Both. :-)

I fixed GNUstep gui - and here is a patch fixing the textview
initialization in your code:

--- PCProjectBuilder.m  Sun Jan 14 16:57:06 2001
+++ PCProjectBuilder.m.new      Sun Jan 28 20:46:28 2001
@@ -81,8 +81,14 @@
   [logOutput setSelectable:YES];
   [logOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
   [logOutput setBackgroundColor:[NSColor lightGrayColor]];
+  [logOutput setHorizontallyResizable: NO];
+  [logOutput setVerticallyResizable: YES];
+  [logOutput setMinSize: NSMakeSize (0, 0)];
+  [logOutput setMaxSize: NSMakeSize (1E7, 1E7)];
+  [[logOutput textContainer] setContainerSize: 
+                              NSMakeSize ([logOutput frame].size.width,
+                                          1e7)];
   [[logOutput textContainer] setWidthTracksTextView:YES];
-  [[logOutput textContainer] setHeightTracksTextView:YES];
 
   [scrollView1 setDocumentView:logOutput];
 
@@ -98,14 +104,19 @@
   [scrollView2 setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
 
   errorOutput = [[NSTextView alloc] initWithFrame:[[scrollView2 contentView] 
frame]];
-
   [errorOutput setRichText:NO];
   [errorOutput setEditable:NO];
   [errorOutput setSelectable:YES];
   [errorOutput setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
   [errorOutput setBackgroundColor:[NSColor whiteColor]];
+  [errorOutput setHorizontallyResizable: NO];
+  [errorOutput setVerticallyResizable: YES];
+  [errorOutput setMinSize: NSMakeSize (0, 0)];
+  [errorOutput setMaxSize: NSMakeSize (1E7, 1E7)];
+  [[errorOutput textContainer] setContainerSize: 
+                              NSMakeSize ([errorOutput frame].size.width,
+                                          1e7)];
   [[errorOutput textContainer] setWidthTracksTextView:YES];
-  [[errorOutput textContainer] setHeightTracksTextView:YES];
 
   [scrollView2 setDocumentView:errorOutput];
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]