Re: Showing submenu item in an NSPopUpButton
Re: Showing submenu item in an NSPopUpButton
- Subject: Re: Showing submenu item in an NSPopUpButton
- From: Gregory Weston <email@hidden>
- Date: Tue, 26 Apr 2005 06:56:03 -0400
On Apr 25, 2005, at 10:38 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?
Considering the fact that you're violating two distinct elements of the
HIG, I'm not surprised that I can't find a clean way to do this. About
the best option I can find is that a NSPopUpButton responds to
setTitle: in a way that accomplishes your immediate goal, albeit with
side-effects, so you could do that in response to the menu selection.
<http://developer.apple.com/documentation/UserExperience/Conceptual/
OSXHIGuidelines/XHIGControls/chapter_10_section_3.html#//apple_ref/doc/
uid/TP30000359-DontLinkElementID_105220>
"A pop-up menu ... [c]ontains nouns or adjectives, but not verbs; use
pull-down menus for commands."
"Don’t use submenus with pop-up menus."
_______________________________________________
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