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, Editing and DoubleClick
GridCtrl, Editing and DoubleClick [message #39987] Wed, 22 May 2013 17:48 Go to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Uno

In a grid with EditString columns when the user double clicks on a column without EditString I would like to:
- Get WhenDoubleLeft events
- Avoid to open the first EditString

Now if 5st field has an EditString and user double clicks over the 2nd field, the 5st field is opened. And, because of it, the grid losts the double click.

A simple solution would be to set in GridCtrl.cpp, line 6579:

UpdateCtrls(UC_SHOW | UC_CTRLS);


Is it possible?


Best regards
Iñaki

[Updated on: Wed, 22 May 2013 17:58]

Report message to a moderator

Re: GridCtrl, Editing and DoubleClick [message #40072 is a reply to message #39987] Wed, 05 June 2013 09:23 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

I added GotoFirstEdit method. Simply add:
grid.GotoFirstEdit(false)

to stop going to the first edit in a row when clicking on non editable cell in this row.

GridCtrl already has WhenLeftDouble. Have you tried it?
Re: GridCtrl, Editing and DoubleClick [message #40076 is a reply to message #40072] Wed, 05 June 2013 12:54 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Thank you Uno

Quote:

GridCtrl already has WhenLeftDouble. Have you tried it?
Cool Of course. The problem is that the opened EditString captures it.


Best regards
Iñaki
Re: GridCtrl, Editing and DoubleClick [message #40078 is a reply to message #40076] Wed, 05 June 2013 23:18 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

koldo wrote on Wed, 05 June 2013 06:54

Thank you Uno

Quote:

GridCtrl already has WhenLeftDouble. Have you tried it?
Cool Of course. The problem is that the opened EditString captures it.

I see.. Then the only solution is too create you own grid control and override ChildMouseEvent method. I could add callback there but IMO this is too specific case to do that.
You could also try the opposite way and react on double click in control that is attached as editor in grid's column.

Re: GridCtrl, Editing and DoubleClick [message #40079 is a reply to message #40078] Thu, 06 June 2013 08:32 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Uno

Do you mean that even using grid.GotoFirstEdit(false), the first EditString would capture the LeftDouble?


Best regards
Iñaki
Re: GridCtrl, Editing and DoubleClick [message #40869 is a reply to message #40079] Thu, 26 September 2013 12:48 Go to previous message
koldo is currently offline  koldo
Messages: 3355
Registered: August 2008
Senior Veteran
Hello Daniel

grid.GotoFirstEdit(false) is enough. Edit is highlighted but it does not get neither the cursor nor the focus, so GridCtrl handles the WhenLeftDouble().


Best regards
Iñaki
Previous Topic: LineEdit font bug
Next Topic: Get the row numbers currently drawn
Goto Forum:
  


Current Time: Thu Mar 28 20:37:29 CET 2024

Total time taken to generate the page: 0.01455 seconds