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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to