FROM : Andrew Platzer
DATE : Wed Apr 27 23:19:02 2005
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.
DATE : Wed Apr 27 23:19:02 2005
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.
| Related mails | Author | Date |
|---|---|---|
| Ian was here | Apr 26, 01:56 | |
| Gregory Weston | Apr 26, 12:56 | |
| Ian was here | Apr 26, 17:22 | |
| Andrew Platzer | Apr 27, 23:19 |






Cocoa mail archive

