On Aug 7, 2008, at 2:53 PM, Rua Haszard Morris wrote:
I am trying to implement a mini-size, square bevel button that pops up a menu, i.e. a popup button with a square appearance and mini size, but have not found a way to achieve this.

NSPopupButton does not support square button appearance, and doesn't support setControlSize: (though it can of course be an arbitrary size).

In Leopard, NSPopUpButton supports any bezel style that NSButton supports (excluding uninteresting cases like Disclosure or Help). NSPopUpButton also supports setControlSize:. Are these not working for you?
Right you are! I think I was forgetting to call setControlSize: on the cell rather than on the popup itself. I have not tested on 10.4 yet (am building against 10.4 SDK).

The other thing I needed to do to make it look appropriate was set the font to a smaller size: [popup setFont:[NSFont systemFontOfSize:[NSFont smallSystemFontSize] - 1]];

It seems I still have a drawing issue, when the window first appears, there's a whiteish rectangle drawn above the button. I think this is due to the parent view not being notified about the menu invalidating the area - the rectangle is similar to the width of the menu and protrudes vertically by the same amount.

thanks
Rua HM.
_______________________________________________

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