Re: NSCell bezel drawing
Re: NSCell bezel drawing
- Subject: Re: NSCell bezel drawing
- From: glenn andreas <email@hidden>
- Date: Thu, 5 Jul 2007 20:28:39 -0500
On Jul 5, 2007, at 7:52 PM, Keith Duncan wrote:
What is the best way to draw a rounded bezel like the one
NSSearchFieldCell draws. I'm aware of the private NSTextFieldCell
method that draws it in this case but I need to replicate it
without subclassing NSTextFieldCell.
I've looked at the functions in NSGraphics more specifically
NSDrawTiledRects which would seem to work in for a rectangular
bezel but I need a rounded bezel. So I considered clipping the path
to a rounded rectangular bezier path but the shadow understandably
wasn't drawn at the edge of the clipping path.
- Keith
Nothing prevents you from creating an NSSearchFieldCell and telling
it to draw its frame in a specified rectangle that you provide (you
can even use it to calculate where the "inside" is for putting your
content) - basically acting like anything else that holds a cell
(like a matrix, or table column).
Of course, if something looks like a search field, you might as well
actually use a search field (since if it looks like a search field,
it should behave like one, and at that point, you've basically got a
search field).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Cardographer | the custom playing card designer
_______________________________________________
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