• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Showing submenu item in an NSPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Showing submenu item in an NSPopUpButton (From: Ian was here <email@hidden>)

  • Prev by Date: Re: NSNotificationCenter
  • Next by Date: Re: NSNotificationCenter
  • Previous by thread: Showing submenu item in an NSPopUpButton
  • Next by thread: Re: Showing submenu item in an NSPopUpButton
  • Index(es):
    • Date
    • Thread