Re: Metrics for a NSTextField
Re: Metrics for a NSTextField
- Subject: Re: Metrics for a NSTextField
- From: Martin Wierschin <email@hidden>
- Date: Wed, 25 Feb 2009 16:17:17 -0800
I'm not really familiar with the particulars of how the field editor
is configured, so take all this with a grain of salt...
The usedRect empty. I believe the reason why is because the
fieldEditor that the window has given me has a zero width.
Sizing the editor may not be the window's responsibility- it may
expect the control to do so. What happens if you resize the
NSTextView and/or NSTextContainer yourself as needed? In fact, you
might have to call additional methods before it is properly usable,
eg: "setUpFieldEditorAttributes:"
If anyone has a suggestion on how to better accomplish this task, I
am interested.
What about just calling sizeToFit on your NSTextField and then
drawing the border around the full frame?
~Martin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden