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/



_______________________________________________
Bug-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gnustep

Reply via email to