FROM : Nicholas Riley
DATE : Tue Dec 17 18:45:42 2002
On Tue, Dec 17, 2002 at 08:53:42AM -0800, Mike Ferris wrote:
> How about using NSTextFieldCell's -cellSizeForBounds:? Give it a rect
> with the width you want and a big height. Since this is
> NSTextFieldCell, the size it returns will be appropriate. If you use
> the text system directly as your sample code did, you'll get something
> that fits the text but not necessarily any extra padding or borders or
> whatever that NSTextFieldCell uses.
Works perfectly, thanks. I did check for methods that NSTextFieldCell
declared, but forgot to check for methods in its superclasses...
--
=Nicholas Riley <<email_removed>> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Tue Dec 17 18:45:42 2002
On Tue, Dec 17, 2002 at 08:53:42AM -0800, Mike Ferris wrote:
> How about using NSTextFieldCell's -cellSizeForBounds:? Give it a rect
> with the width you want and a big height. Since this is
> NSTextFieldCell, the size it returns will be appropriate. If you use
> the text system directly as your sample code did, you'll get something
> that fits the text but not necessarily any extra padding or borders or
> whatever that NSTextFieldCell uses.
Works perfectly, thanks. I did check for methods that NSTextFieldCell
declared, but forgot to check for methods in its superclasses...
--
=Nicholas Riley <<email_removed>> | <http://www.uiuc.edu/ph/www/njriley>
Pablo Research Group, Department of Computer Science and
Medical Scholars Program, University of Illinois at Urbana-Champaign
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Nicholas Riley | Dec 17, 16:42 | |
| Mike Ferris | Dec 17, 17:53 | |
| Nicholas Riley | Dec 17, 18:45 | |
| matt neuburg | Dec 17, 21:19 |






Cocoa mail archive

