NSPopUpButton + Bindings + Show All Option

后端 未结 1 1701
鱼传尺愫
鱼传尺愫 2021-01-06 14:31

I\'m trying to develop a NSPopUpButton that will serve as a filter to some datasource, let\'s say a NSArrayController that fills a table.

I

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-06 15:32

    sounds to me like you're looking for the NSContentPlacementTagBindingOption.

    you edit the NSMenu that's attached to the NSPopupButton as follows

    setup of the pop-up menu button's menu

    you then edit the settings on the NSMenuItem you want to have replaced with your array controller contents so that it has a meaningful tag associated with it

    settings for the item that is going to be dynamically replaced by bindings

    you then specify that tag as the content placement tag value on the NSPopupButton's bindings for the content/content* bindings.

    bindings for the pop-up button itself

    0 讨论(0)
提交回复
热议问题