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 » Right Mouseclick on ArrayCtrl
Right Mouseclick on ArrayCtrl [message #9477] Fri, 11 May 2007 00:06 Go to next message
michael is currently offline  michael
Messages: 153
Registered: May 2007
Location: Germany
Experienced Member
How can i catch a right mouseclick on an arrayctrl? I have a popup-menu which i can open on left mouseclick by using this code
array.WhenLeftClick = THISBACK(SOME_FUNCTION);


But there is no WhenRightClick...?

Michael
Re: Right Mouseclick on ArrayCtrl [message #9478 is a reply to message #9477] Fri, 11 May 2007 09:39 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
michael wrote on Thu, 10 May 2007 18:06

How can i catch a right mouseclick on an arrayctrl? I have a popup-menu which i can open on left mouseclick by using this code
array.WhenLeftClick = THISBACK(SOME_FUNCTION);


But there is no WhenRightClick...?

Michael


Well, right-click handling is reserved for context menu via WhenBar.

You you really need "naked" right-clicks, you have to derive your own class from ArrayCtrl and override RightDown (calling ArrayCtrl::RightDown at the beginning).

Mirek
Re: Right Mouseclick on ArrayCtrl [message #9479 is a reply to message #9477] Fri, 11 May 2007 09:40 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

ArrayCtrl does not support WhenRightClick. To use your custom menu use WhenBar:
array.WhenBar = THISBACK(MyMenu)

void MyMenu(Bar &bar)
{
  bar.Add("Option 1")
  ...
}
Re: Right Mouseclick on ArrayCtrl [message #9487 is a reply to message #9479] Fri, 11 May 2007 19:09 Go to previous message
michael is currently offline  michael
Messages: 153
Registered: May 2007
Location: Germany
Experienced Member
unodgs wrote on Fri, 11 May 2007 09:40

ArrayCtrl does not support WhenRightClick. To use your custom menu use WhenBar:
array.WhenBar = THISBACK(MyMenu)

void MyMenu(Bar &bar)
{
  bar.Add("Option 1")
  ...
}



Thanks all, this works.

Michael
Previous Topic: GridCtrl package compile error
Next Topic: DropList multiple selection
Goto Forum:
  


Current Time: Tue Apr 30 06:15:43 CEST 2024

Total time taken to generate the page: 0.07869 seconds