Re: Repositioning an NSTextFieldCell?
Re: Repositioning an NSTextFieldCell?
- Subject: Re: Repositioning an NSTextFieldCell?
- From: Matt Neuburg <email@hidden>
- Date: Sat, 25 Nov 2006 15:46:56 -0800
- Thread-topic: Repositioning an NSTextFieldCell?
On or about 11/25/06 3:22 PM, thus spake "Joel Norvell"
<email@hidden>:
> To find it,
> do a Google codesearch for "VerticallyCenteredTextFieldCell.m" and follow the
> first link.
That class is also on your hard disk
(/Developer/Examples/IOKit/scsi/SCSITaskLib/Authoring/Cocoa/).
The actually implementation is terrible; it makes a whole slew of
unwarranted assumptions about how high the text is and how many lines it
might consist of (and even when it's a single line, on my machine it cuts
off the descenders). Furthermore, if this cell is being used in an
NSTextField that draws its background and you hide and then show that text
field, much of the field fails to draw itself. However, it does illustrate
the general principle that I was getting at before: in addition to
editWithFrame and selectWithFrame, it overrides drawInteriorWithFrame. m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide - Second Edition!
http://www.amazon.com/gp/product/0596102119
Take Control of Word 2004, Tiger, and more -
http://www.takecontrolbooks.com/tiger-customizing.html
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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