• 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: Display selectd sub-menuItem in NSPopUpButton
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Display selectd sub-menuItem in NSPopUpButton


  • Subject: Re: Display selectd sub-menuItem in NSPopUpButton
  • From: Graham Cox <email@hidden>
  • Date: Sun, 16 Feb 2014 11:11:38 +1100

On 16 Feb 2014, at 5:00 am, Leonardo <email@hidden> wrote:

> I think there should be a way to just open and display the submenus and
> highlight a menu item, even if the mouse is elsewhere.


But there isn't.

You might be able to come up with a whole bunch of code that follows the tree back to the root parent item, displays that (there is API to pop up a menu positioned at a given item), then open the submenu(s) down to the selected item, but it's going to be complicated and ultimately, unique to your app, since it's not directly supported in the NSMenu API.

Maybe you should just consider a different approach, such as lists, or NSPathControl, which are able to indicate a current state. Menus are designed for brief transitory indications of state while the user is a highly temporary 'mode', i.e. dragging the mouse through some menus. You are trying to use it for something it wasn't designed for.

--Graham



_______________________________________________

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


References: 
 >Re: Display selectd sub-menuItem in NSPopUpButton (From: Leonardo <email@hidden>)

  • Prev by Date: Re: Display selectd sub-menuItem in NSPopUpButton
  • Next by Date: Re: Display selectd sub-menuItem in NSPopUpButton
  • Previous by thread: Re: Display selectd sub-menuItem in NSPopUpButton
  • Next by thread: Re: Display selectd sub-menuItem in NSPopUpButton
  • Index(es):
    • Date
    • Thread