bugGNUstep - Bugs: bug #21695, [NSText sizeToFit] does not resize...

 
 

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

bug #21695: [NSText sizeToFit] does not resize vertically

Submitted by:  Christopher Wojno <wojno>
Submitted on:  Sun 02 Dec 2007 02:43:48 AM UTC  
 
Category: Gui/AppKitSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: Fred Kiefer <FredKiefer>
Open/Closed: Closed

Fri 04 Jan 2008 09:03:11 PM UTC, comment #1:

I added some code to SVN that should fix this problem.

Fred Kiefer <FredKiefer>
Project MemberIn charge of this item.
Sun 02 Dec 2007 02:43:48 AM UTC, original submission:

Instance method of NSText: sizeToFit, which is supposed to resize the receiver such that it only encompasses it's contained text, does not appear to work when attempting to resize vertically. I'm not sure if a bug has been filed on this yet as I do not know what other components it affects. It does work for horizontal.

Please See:
http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSText_Class/index.html#//apple_ref/doc/uid/TP40004128

NSText *t = [NSText alloc] initWithFrame:NSMakeRect(0,0,1,1)];
[t setVerticallyResizable:YES]; // this should be the default anyway
[t setString:@"TestString"];
[t sizeToFit];
NSRect bad = [t frame];

Result:
1 = bad.size.height

Christopher Wojno <wojno>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by FredKiefer (Posted a comment)
  • -unavailable- added by wojno (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 29 Nov 2008 02:06:58 PM UTCFredKieferStatusReady For Test=>Fixed
      Open/ClosedIn Test=>Closed
    Fri 04 Jan 2008 09:03:11 PM UTCFredKieferStatusNone=>Ready For Test
      Assigned toNone=>FredKiefer
      Open/ClosedOpen=>In Test

    Back to the top


    Powered by Savane 3.1-cleanup1