• 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
Submenu in ToolbarItem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Submenu in ToolbarItem


  • Subject: Submenu in ToolbarItem
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Sun, 14 Dec 2008 19:52:01 +0700

I have an NSToolbar which has NSToolbarItems with [toolbarItem view] = NSButton.

When [toolbar displayMode] = NSToolbarDisplayModeLabelOnly and I press the label [toolbarItem menuFormRepresentation] shows its submenu.
Otherwise (Icon visible) [toolbarItem label] gets shown, which does nothing.


The documentations says: "If a toolbar item’s custom menu form representation has a submenu, then the toolbar drops down that submenu under the toolbar item in Text Only Mode"
So this is the expected behaviour.


But I want some way to get this submenu, even when the Icon (in my case the button) is shown.
How?


I do not insist on using NSButtons - I just need something which can be on or off like an NSOnOffButton.


Another (minor) problem: when the [toolbarItem menuFormRepresentation] is in the NSOnState, the toolbar does not show the '✓' (CHECK MARK).
So I add (or remove, depending on state) the '✓' to the title. But then the overflow menu item contains two check marks: one for its state and another in the title. Looks kind of silly.



Kind regards,

Gerriet.

_______________________________________________

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


  • Prev by Date: Re: Cocoa equivalent of std::vector<MyType> ?
  • Next by Date: Re: Cocoa equivalent of std::vector<MyType> ?
  • Previous by thread: Re: Cocoa equivalent of std::vector<MyType> ?
  • Next by thread: Notification Sent When Window Is Ordered Back?
  • Index(es):
    • Date
    • Thread