Re: Repositioning an NSTextFieldCell?
Re: Repositioning an NSTextFieldCell?
- Subject: Re: Repositioning an NSTextFieldCell?
- From: Matt Neuburg <email@hidden>
- Date: Sat, 25 Nov 2006 08:30:47 -0800
- Thread-topic: Repositioning an NSTextFieldCell?
On Fri, 24 Nov 2006 17:46:15 -0500, Daniel Jalkut <email@hidden>
said:
>Take a look at my vertically centered text cell subclass:
>
>http://www.red-sweater.com/blog/148/what-a-difference-a-cell-makes
>
>That should be easily modifiable to achieve the result you're looking
>for.
I'm sure that works great in, say, a table, but I'm not seeing how it works
for the place where I want to use a vertically centered text field cell -
namely, in an actual NSTextField. In my testing, the text is not vertically
centered, but the field editor is (so they are in two different places - in
fact, if the text field is tall enough, I can see both at the same time,
because the field editor fails to cover the text field's text). Am I missing
some key point here? I could, for example, be misusing the cell (i.e. the
way I'm substituting the vertically centered cell for the NSTextField's cell
as it comes out the nib might be wrong).
In my experience, relocating the text of an NSTextField requires its cell's
drawInteriorWithFrame to be overridden. (Your class doesn't do that.) But
again, I could be completely wrong; that's what I've been doing, and it
works for me, but if your class is showing me a better way, I'd like to
understand it.
Thx - m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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