Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField resizing



On Wednesday, November 28, 2001, at 11:58 AM, Kevin Barnd wrote:

in my code i call the sizeToFit method. this resizes my NSTextField, but it resizes the text field upward. i was wondering if there is a way to have it resize downward.

It will resize downward, does the content get shorter? if so and sizeToFit still doesn't work, try thrashing it:

- (void)controlTextDidChange:(NSNotification *)aNotification {
[textField sizeToFit];
[textField updateCell:[textField cell]];
}

- (void)controlTextDidEndEditing:(NSNotification *)aNotification {
[textField sizeToFit];
[textField setNeedsDisplay:YES];
}


Andre.


References: 
 >NSTextField resizing (From: "Kevin Barnd" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.