http://stackoverflow.com/questions/3849728/show-contextual-menu-on-ctrl-click-right-click-on-header-of-nstableview

On Feb 26, 2011, at 9:31 AM, Quinn Taylor wrote:

> I frequently get annoyed that the only way to select which columns are 
> visible is through a sub-menu of View. Please add the behavior like Mail has 
> in the message viewer, where right-clicking in the table header displays a 
> contextual menu that allows the user to (un)check a column. (I personally 
> would leave out the "Sort By" sub-menu, since it's easier to just click on a 
> table column anyway.)
> 
> I just added this for my own app, and it's trivial to do. Just call -setMenu: 
> on -[NSTableView headerView] in your view controller. You might even be able 
> to use the same NSMenu that lives under View > File Browser Columns.  :-)
> 
> Thanks,
>  - Quinn      

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to