Sign in Join

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

Mailing lists / lazarus / 2014-10

LCLMessageGlue Status

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Fabio Luis Girardi

Hello!!

I'm doing a virtual keyboard for lazarus using the LCLMessageGlue unit, but methods
LCLSendKeyUpEvent and LCLSendKeyDownEvent are not working.

So, what's the current status of LCLMessageGlue unit?

The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141031/db0bde2e/attachment.html>

Reply by email

Andrew Haines
to Fabio Luis Girardi
Fabio Luis Girardi wrote 15 lines
Hello!! I'm doing a virtual keyboard for lazarus using the LCLMessageGlue unit, but methods LCLSendKeyUpEvent and LCLSendKeyDownEvent are not working. So, what's the current status of LCLMessageGlue unit? -- The best regards, Fabio Luis Girardi PascalSCADA Project http://sourceforge.net/projects/pascalscada http://www.pascalscada.com

Sorry for the late reply. I stumbled on this question in a google search.

SHORT VERSION:
Methods in LCLMessageGlue are not intended for nor should they be used directly in user programs or the results could be unexpected.

LONG VERSION:
The LCLMessageGlue unit is only meant to simplify sending messages to the lcl as the result of an actual change in the underlying widgetset(gtk, qt win32, etc). Using the methods directly in your program won't actually cause a change but will probably trigger the event for the message you send.

For instance if you used LCLSendClickedMsg(MyButton) the OnClick event would be triggered but the button would not visibly react.

Using LCLSendKey[Up/Down]Event won't work the way you want because the widgetset (gtk, qt, win32, etc) is actually managing the text content of the component. i.e. the LCL isn't doing Text:=Text+NewChar for every keypress event, the widgeset is responsible for that. Exceptions to this could be custom controls implemented fully in the LCL like TTreeView and TSynEdit.

Regards,

Andrew Haines

Reply by email