Show NSPopover from NSToolbarItem Button

后端 未结 4 985
孤城傲影
孤城傲影 2021-02-08 12:50

I want to show an NSPopover from an NSToolbarItem button in my toolbar.
(i.e. positioned below the button).

Ideally, I want to pass the

4条回答
  •  执念已碎
    2021-02-08 13:41

    You can send the action directly from the NSButton enclosed in the NSToolbarItem (which is what you should generally do anyways, consider segmented controls, where each segment has its own target/action), and that will do the trick.

提交回复
热议问题