delphi - Send key to component -
i'm writing application user entering data in different languages tcxgrid. facilitate entering of keys not on normal keyboard (á or ¿) decided add ability user add button, when pressed send character directly grid.
basically button gets pressed, caption on button character send grid. right way of doing active grid cell, copy text there, append character add , set grid value new string. doesn't seem ideal.
any ideas on clean way this?
if can handle of control, can post messages control indicate typing.
postmessage(edit1.handle, wm_char, ord('a'), 0);
i'm sure there's slicker way it, got characters doing off of using "character map":
const testchar1 = 'Á'; testchar2 = '¿'; begin postmessage(edit1.handle, wm_char, ord(testchar1), 0); postmessage(edit1.handle, wm_char, ord(testchar2), 0); end;
if need virtual scan codes, use wm_keydown , wm_keyup messages.
Comments
Post a Comment