Re: NSPopupUpButton not showing checked menu items
Re: NSPopupUpButton not showing checked menu items
- Subject: Re: NSPopupUpButton not showing checked menu items
- From: Steve Christensen <email@hidden>
- Date: Mon, 24 Nov 2008 15:15:13 -0800
On Nov 23, 2008, at 11:26 PM, Benjamin Dobson wrote:
Actually, I only wanted to select a single item in the pulldown
case, the same as what correctly happens for me in the popup case.
The problem has always been that, even though the button itself is
reporting that a particular item is "selected," none of the
underlying NSMenuItems' state is ever set to anything other than
where it was left in IB (which is typically NSOffState). And so a
check mark is never set next to the most-recently selected menu item.
I'm still wondering why you're using a pull down menu, not a pop up
one.
Very simply because I have a situation where real estate is tight.
The popup variant always displays the current selection so you need
to allocate enough horizontal space for the button to display the
widest menu item text. By using the pulldown button, I can just
display an icon and "down arrow" on the button, and use more space
only when the user changes options. I have a descriptive icon next to
each menu item, which gets reflected directly on the button when the
menu is closed.
Believe me, if I could do something similar with a popup (vs
pulldown) button, I would. Much less work.
steve
_______________________________________________
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