Re: Showing submenu item in an NSPopUpButton
Re: Showing submenu item in an NSPopUpButton
- Subject: Re: Showing submenu item in an NSPopUpButton
- From: Andrew Platzer <email@hidden>
- Date: Wed, 27 Apr 2005 14:19:02 -0700
On Apr 25, 2005, at 4:56 PM, Ian was here wrote:
I created a menu with submenus, then attached it to my
NSPopUpButton. The issue that I'm having is that when
a submenu item is selected, it won't show up in the
popup button (the submenu item is selected OK and
performs it's task). I tried to force the popup button
to show submenu items by setting it's title with the
selected sub-item. It just added the submenu item to
the normal menu area.
Does anyone have any ideas for getting submenu items
to display?
Take a look at -[NSPopUpButtonCell setUsesItemFromMenu:].
If this flag is set to NO, then you can set the popup cell's menu
item using -[NSPopUpButtonCell setMenuItem:] to the item selected
regardless of where the item is located and the popup will display
that item instead of the selected one.
Andrew Platzer
Application Frameworks
Apple Computer, Inc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden