On 21/10/2008, at 4:34 AM, Dalzhim Dalzhim wrote:

I am currently trying to subclass NSPopUpButton while keeping compatibility with Mac OS 10.4 in order to add the possibility of choosing the color of the highlight when the mouse is placed over the button, including gradient fills. The problem is that neither NSPopUpButton or NSPopUpButtonCell seem to provide public methods to draw the border of the button or the image with
the arrows.  Only the title of the button can be drawed using a public
method while handling the rest of the drawing in a subclass.


NSPopupButtonCell is a subclass of NSMenuItemCell, which is itself a subclass of NSButtonCell. This means that it inherits all the methods of those classes. Have a look at:

- (void)drawBezelWithFrame:(NSRect)frame inView:(NSView *)controlView
- (void)drawBorderAndBackgroundWithFrame:(NSRect)cellFrame inView: (NSView *)controlView

and friends.

--
Rob Keniger



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to