hello
I have to send charakters to a TEdit-/TComboBox- Field. It seems to me, new characters (from keyboard) will be handled by the widgetset-object?.
How can I send a character without the keyboard to a text-field for showing in the field??
field.Text:=field.Text + character;
doesn't work, because of the cursorposition.
field.SelText:=character;
doesn't work too, because of mismatches of SelStart and SelLength...
example: * Text in Field "123|45678" ( | is the cursor between 3 and 4 )
-> field.SelText:='z'; overwrites 3 characters ( maybe it is a BUG ?! ... SelStart = 3 )
result: Text in Field "123z|78" ( | is the cursor )
is the cursor between 4 and 5, -> 4 characters will be overriten ( SelStart=4 )
is the cursor between 2 and 3, -> 2 characters will be overriten ( SelStart=2 )
BUG ?!
Is there an other way to send a character to the Text-field?
I use Ubuntu 10.10 64bit and Lazarus 0.9.30, fpc 2.4.2 -> from SourceForge