• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTextField resizing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextField resizing


  • Subject: Re: NSTextField resizing
  • From: Andre Lipinski <email@hidden>
  • Date: Fri, 30 Nov 2001 01:52:00 -0500

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>)

  • Prev by Date: Re: Cocoa beginner question
  • Next by Date: How to draw a String in a Cocoa-Java-App?
  • Previous by thread: NSTextField resizing
  • Next by thread: Can server send message to client through NSConnection
  • Index(es):
    • Date
    • Thread