bug-gnustep
[Top][All Lists]
Advanced

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

[bug #18649] NSScrollview/NSTextView from gorm: text grows but does not


From: Paddy Smith
Subject: [bug #18649] NSScrollview/NSTextView from gorm: text grows but does not shrink
Date: Sat, 30 Dec 2006 21:27:54 +0000
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.8.0.7) Gecko/20060830 Firefox/1.5.0.7 (Debian-1.5.dfsg+1.5.0.7-2)

URL:
  <http://savannah.gnu.org/bugs/?18649>

                 Summary: NSScrollview/NSTextView from gorm: text grows but
does not shrink
                 Project: GNUstep
            Submitted by: padski
            Submitted on: Saturday 12/30/2006 at 21:27
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

when I throw together a test app in gorm, the NSTextView does not
behave as I would expect, although it works okay from code like this:

  NSScrollView *textScrollView = [[NSScrollView alloc] initWithFrame:
mRect];
  [textScrollView setBorderType: NSBezelBorder];
  [textScrollView setHasHorizontalScroller: NO];
  [textScrollView setHasVerticalScroller: YES];
  [textScrollView setAutoresizingMask:
NSViewHeightSizable|NSViewWidthSizable];

  mRect = [[textScrollView contentView] frame];
  NSTextView *textView = [[NSTextView alloc] init];
  [textView setFrame: mRect];
  [textView setTextContainerInset: NSMakeSize(5,5)];
  [textView setBackgroundColor: [NSColor textBackgroundColor]];
  [textView setRichText: YES];
  [textView setUsesFontPanel: YES];
  [textView setHorizontallyResizable: NO];
  [textView setVerticallyResizable: YES];
  [textView setMinSize: NSMakeSize (0, 0)];
  [textView setMaxSize: NSMakeSize (1E7, 1E7)];
  [textView setAutoresizingMask: NSViewHeightSizable|NSViewWidthSizable];
  [[textView textContainer] setContainerSize: NSMakeSize (mRect.size.width,
1E7)];

  [[textView textContainer] setWidthTracksTextView: YES];
  [textView setString: @""];

  [textScrollView setDocumentView: textView];

  [[myWindow contentView] addSubview: textScrollView];

(code from GNUmail)

instead it grows when resized horizontally but will not shrink back.

see attached tgz for demo of problem + screenshot







    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Saturday 12/30/2006 at 21:27  Name: textview_resize_problem.tgz  Size:
16kB   By: padski

<http://savannah.gnu.org/bugs/download.php?file_id=11639>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?18649>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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