bugGNUstep - Bugs: bug #18649, NSScrollview/NSTextView from gorm:...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

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

Submitted by:  Paddy Smith <padski>
Submitted on:  Sat 30 Dec 2006 09:27:53 PM UTC  
 
Category: GormSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Sun 25 Feb 2007 07:54:30 AM UTC, comment #1:

I have observed the same thing. The workaround is

[textView setHorizontallyResizable: NO];

I have no idea why that resets correct behavior.

Mark Tracy <tracy454>
Sat 30 Dec 2006 09:27:53 PM UTC, original submission:

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

Paddy Smith <padski>

 

Attached Files
file #11639:  textview_resize_problem.tgz added by padski (16KiB - application/x-compressed-tar)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by tracy454 (Posted a comment)
  • -unavailable- added by FredKiefer (Updated the item)
  • -unavailable- added by padski (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 04 Feb 2007 11:21:34 PM UTCFredKieferCategoryNone=>Gorm
    Sat 30 Dec 2006 09:27:53 PM UTCpadskiAttached File-=>Added textview_resize_problem.tgz, #11639

    Back to the top


    Powered by Savane 3.1-cleanup1