picoe / Eto

Cross platform GUI framework for desktop and mobile applications in .NET
Other
3.59k stars 326 forks source link

Mac - Contextmenu on GridView Column.Header? #1341

Open TomQv opened 5 years ago

TomQv commented 5 years ago

How to get a context-menu with right mouse click on GridView column-header on Mac?

With wpf I can check e.Buttons and e.Location.y in CellClick-event, but on Mac there is no event triggered when clicked on the header.

Any workaround for this?

ColumnHeaderClick is only triggered with left mouse button.

cwensley commented 5 years ago

Have you tried the MouseDown event?

TomQv commented 5 years ago

Yes, i tried, but its not triggered,
Only ColumnHeaderClick on left button.

TomQv commented 5 years ago

Any quick workaround for this imaginable?

cwensley commented 5 years ago

Hey @TomQv, not sure at this point. Perhaps look at NSTableView documentation to see where that can be defined, then you could probably create a native style to wire it up.

TomQv commented 5 years ago

No ways....

I solved this now by changing the design. Added a small column with headertext "=", which just acts as a button, no data When clicked, I show the context-menu to let the user choose visible columns. Thunderbird is also dong it like this.

Bzw. there is no Tooltip-property on ColumnHeaders.