Hello Cocoa-Dev,

Oh the joy of subclassing subclasses of NSControl and NSCell. I am making a custom pop up menu object. I subclass NSPopUpButtonCell and simply draw my custom menu button in the drawBezelWithFrame method.

The frame rect that this method passes in has been inset by some amount which means that the menu registers mouse clicks for several pixel rows above its drawing frame but rejects mouse clicks for several pixel rows at the bottom of its frame. I have tried using the bounds rect of the control view but I get the same behaviour. How can I get the real bounding rect of the cell? I have the same problem with a subclass of NSTextFieldCell.

I did try creating a pop up menu control from scratch by creating menus and managing the state of its items and I could finish this but it feels like I'm reinventing the wheel really.

Thanks,
Stephen _______________________________________________

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 arch...@mail-archive.com

Reply via email to