Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-03

How can use TControl.Perfom(Perform(LM_KEYUP, VK_UP, 1);

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

FreeMan

Hello,
In my TExLookUp Component I need to sent key stroks to subcomponent Grid. How can I do this. Its has to be crossplatform too. Example:
TExLookUp.EditKeyUp(........
...

   if Key=VK_UP   then FGrid.Perform(LM_KEYUP, VK_UP, 1);
   if Key=VK_DOWN then FGrid.Perform(LM_KEYDOWN, VK_DOWN, 1);

or how?
For testing, on new application, one db grid (its showing some data from datasource) and two button has on Tform. On buttonclick event has Grid.Perform(LM_KEYDOWN, VK_DOWN, 1); and other has Grid.Perform(LM_KEYUP, VK_UP, 1); but not working this codes. no any error. my system is Kubuntu 13.10 x64 Lazarus and fpc last svn version and QT widgetset.
has anyone got any suggestion or idea?
Thank you

Reply by email

Mattias Gaertner
to FreeMan
Show quoted text 16 lines
Hello, In my TExLookUp Component I need to sent key stroks to subcomponent Grid. How can I do this. Its has to be crossplatform too. Example: TExLookUp.EditKeyUp(........ ... if Key=VK_UP then FGrid.Perform(LM_KEYUP, VK_UP, 1); if Key=VK_DOWN then FGrid.Perform(LM_KEYDOWN, VK_DOWN, 1); or how? For testing, on new application, one db grid (its showing some data from datasource) and two button has on Tform. On buttonclick event has Grid.Perform(LM_KEYDOWN, VK_DOWN, 1); and other has Grid.Perform(LM_KEYUP, VK_UP, 1); but not working this codes. no any error. my system is Kubuntu 13.10 x64 Lazarus and fpc last svn version and QT widgetset. has anyone got any suggestion or idea?

Do you want to emulate keystrokes or do you want the grid to go one row up/down?

Mattias

Reply by email

FreeMan
to Mattias Gaertner

emulate keystrokes, because 1-2 grid's event have to triggered, for row up/down easy way, fgrid.datasource.dataset.Next or fgrid.datasource.dataset.Prev;
I mean, Edit is foucused, I can handle keystrokes on Edit, I wanna sent some keystrokes to grid too (with out grid NOT focused), Like VK_Down, VK_Up, VK_escape, not char(s)
Thank you

08-03-2014 13:22 tarihinde, Mattias Gaertner yazd?:

Show quoted text 5 lines
Do you want to emulate keystrokes or do you want the grid to go one row up/down? Mattias

Reply by email