Escape key seems to be captured before EGrid can process it while editing a cell

Started by Pete Totushek, October 19, 2011, 12:09:52 PM

Previous topic - Next topic

Pete Totushek

Is anybody currently using EGrid with the newer versions of Firefly?  I'm having an issue with the 'ESC' key when using EGrid that I can't find a work around on my own - so wondering if anyone has any ideas.  I am using Firefly v3.10.  The EGrid works great, and 'ESC' works great until you are editing a cell.  The normal process should be...if you are editing a cell, hitting 'ESC' should take you out of editing and the old contents of that cell should be restored.  When I compiled my program using Firefly v3.01 all was good.  Now when I try to compile in v3.10, 'ESC' just gets completely ignored when editing a cell (like you aren't hitting a key at all).  I remember in one of the early 3.0 versions Firefly trapped the 'ESC' key a little differently than it had in the past.  I'm guessing that it has something to do with the way Elias used dynamically created text boxes for editing cells.  Can anyone confirm this?  Also, any ideas or work arounds?
-Pete
www.totusoft.com -- Home of LAN Speed Test

Paul Squires

There is code in the FireFly generated message loop to trap the ESC key for multiline textboxes. The ESC key will be discarded. I did this because pressing ESC in a multiline TextBox would close the Form.

Not sure if this is what is causing your issue?
Paul Squires
PlanetSquires Software

Pete Totushek

Thank you Paul!  That was it.  I manually went into my form's .inc file and commented out the Firefly generated ''If (Msg.message = %WM_KEYDOWN) And (Msg.wParam = %VK_ESCAPE) Then" section (as I'm not using any multi-line text boxes in this form) and it works.  Is there any other way to do this - or - is this the best way?
-Pete
www.totusoft.com -- Home of LAN Speed Test