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 » RightClick on HeaderCtrl
RightClick on HeaderCtrl [message #20273] Fri, 06 March 2009 13:49 Go to next message
Kajko is currently offline  Kajko
Messages: 14
Registered: December 2008
Location: Ireland, Serbia
Promising Member
hi,

is there any way to find out when and which column was Right clicked on the header ?

I am creating some DB browse control and need that as a way to set filter on desired column...if I made my self clear, lol....

Thx,
Sasa


b78a07c7fb9b68436af9fd23f4e76cc5
Re: RightClick on HeaderCtrl [message #20275 is a reply to message #20273] Fri, 06 March 2009 14:36 Go to previous messageGo to next message
darthspawn is currently offline  darthspawn
Messages: 58
Registered: February 2009
Member
I see in the arrayctrl documentation the function
GetClickColumn()

that return the last clicked column in the array, have you tried?

Sam
Re: RightClick on HeaderCtrl [message #20276 is a reply to message #20275] Fri, 06 March 2009 16:06 Go to previous messageGo to next message
Kajko is currently offline  Kajko
Messages: 14
Registered: December 2008
Location: Ireland, Serbia
Promising Member
Hi,

I need to detect Right click on the header control.

Sasa


b78a07c7fb9b68436af9fd23f4e76cc5
Re: RightClick on HeaderCtrl [message #20277 is a reply to message #20276] Fri, 06 March 2009 16:52 Go to previous messageGo to next message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
I think you can set the WhenBar callback for each column, and use that to detect right mouse clicks. It should still work even if you don't want to create a menu:
header.Add("Column 1").WhenBar = THISBACK1(OnColumnRightDown, 1)

void OnColumnRightDown(Bar &bar, int columnix) {
...
}
Re: RightClick on HeaderCtrl [message #20331 is a reply to message #20273] Thu, 12 March 2009 00:13 Go to previous message
Kajko is currently offline  Kajko
Messages: 14
Registered: December 2008
Location: Ireland, Serbia
Promising Member
That has sorted it, thanks.

Sasa


b78a07c7fb9b68436af9fd23f4e76cc5
Previous Topic: Question about GridCtrl
Next Topic: How to change color background of a cell?
Goto Forum:
  


Current Time: Mon Apr 29 09:57:22 CEST 2024

Total time taken to generate the page: 0.02486 seconds