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 » detecting clicked row in ArrayCtrl [FIXED...]
Re: detecting clicked row in ArrayCtrl [message #2058 is a reply to message #2056] Thu, 30 March 2006 22:57 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
hojtsy wrote on Thu, 30 March 2006 15:40

I can hardly imagine an ArrayCtrl where you are interested in left clicks but not the position of them. At least you would be interested in the clicked row index, but adding column index too could not hurt. Since the clicked row is not always available through GetCursor (clicks below last row), would I need to subclass ArrayCtrl just to do exactly the thing that WhenLeftClick callback is for? How about adding a GetClickPosition() public method, which the WhenLeftClick can call?


I believe there is only a little difference between this and my original "WhenLeftClickNoItem" suggestion - as long as your are not interested in "non-existing" (past the last row) rows (which I believe you should not be).

I mean - WhenLeftClickNoItem -> indicates click outside

WhenLeftClick -> indicates click inside, use GetCursor to get row, GetClickColumn to get column.

Mirek

P.S.: would it be based on my actual experience, I would remove almost all ArrayCtrl callbacks except of WhenCursor, WhenLeftDouble (maybe add WhenLeftDoubleNoItem) and WhenBar. I have not used others for years....
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: edit data in arrayctrl [GOOD EXAMPLES...]
Next Topic: how to use ArrayCtrl.SetLineCy(int,int)?
Goto Forum:
  


Current Time: Tue Sep 02 00:38:54 CEST 2025

Total time taken to generate the page: 0.05540 seconds