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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -