Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » GridCtrl: How to display a menu on header right click?
icon5.gif  GridCtrl: How to display a menu on header right click? [message #44376] Mon, 02 March 2015 11:05 Go to next message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
Member
When using an ArrayCtrl, One could use.

HeaderObject().WhenBar = THISCALL(MyHeaderMenu);


To show a menu when right clicking on the header.

What would be the equivalent when using a GridCtrl?
Re: GridCtrl: How to display a menu on header right click? [message #44377 is a reply to message #44376] Mon, 02 March 2015 11:26 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

There is WhenMenuBar for context menu and WhenToolBar for toolbar.
Inside your own menu builder you can use predefined grid menu functions like StdMenuBar, NavigatingBar etc.
Re: GridCtrl: How to display a menu on header right click? [message #44381 is a reply to message #44377] Mon, 02 March 2015 15:55 Go to previous messageGo to next message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
Member
How do you detect if the menu was activated in the header and not in another row?

I want to show a different menu on the header than for the items.
Re: GridCtrl: How to display a menu on header right click? [message #44382 is a reply to message #44381] Mon, 02 March 2015 16:14 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

rxantos wrote on Mon, 02 March 2015 15:55
How do you detect if the menu was activated in the header and not in another row?
I want to show a different menu on the header than for the items.

In the menu builder check if the mouse position is less than fixed rows height (use GetFixedHeight() to get this value)
Re: GridCtrl: How to display a menu on header right click? [message #44389 is a reply to message #44382] Thu, 05 March 2015 07:51 Go to previous message
rxantos is currently offline  rxantos
Messages: 72
Registered: October 2011
Member
Thank you, sometimes one look for overcomplicated things and misses the simple solution.
Previous Topic: BUG: ArrayCtrl - sorting
Next Topic: Virtual arrays and buttons.
Goto Forum:
  


Current Time: Sat Apr 20 01:52:30 CEST 2024

Total time taken to generate the page: 1.17819 seconds