context menu based on NSTableViewCell

后端 未结 7 827
余生分开走
余生分开走 2021-02-03 12:16

i would like to place a context menu onto a NSTableView. this part is done. what i would liek to do is to show different menu entries based on the content of the ri

7条回答
  •  渐次进展
    2021-02-03 12:55

    As TheGoonie mentioned, I also got the same experience- context menu items were remained disable. However the reason for items being disabled is 'Auto Enables Items' property.

    Make 'Auto Enables Items' property to off. or set it programmatically to NO.

    [mTableViewMenu setAutoenablesItems:NO];
    

提交回复
热议问题