[lazarus] TEdit control lacks a OnKeyPress event
Andrew Johnson
aj_genius at hotmail.com
Tue Sep 24 10:34:39 EDT 2002
On 24 Sep 2002 08:38:00 -0500
"Tony Maro" <tonym at nlisc.com> wrote:
>MMm - well if I had a OnKeyUp then I could do the same thing I did for
>my combobox autocompletes and adjust the .text after the char is placed
>in it, as you describe. However, I tried adding these to the
>declaration and recompiling and the events didn't appear in the IDE - I
>must have done something wrong.
It worked for me.. so make sure you added them to the Published section of
TEdit. And do a make clean all. Other wise I do not know what you're doing
wrong...
As for the GTK problem.. nobody implemented updating the GTK message with
the new value.. So I tried.. but I am running into a few problems. 1.)
someone switched it to use DeliverPostMessage.. BAD idea. this will mean
that the calling routine will get closed before it ever getes a response,
therefore the change code is never run, because there wasn't a change yet.
2.) If the value in question is a ASCII key 1-31 it has to be translated
back to its GTK value, and there is no such routine yet. And if it GTK
Win32, any value has to be mapped back into its GTK value, because its
String value is broken. I may just copy the routine to convert a GTKKey into
its char value, and invert it to do the opposite. If I can do this, and
switch KeyDown and KeyPress to use Object.Dispatch instead, this should make
changing the key value for either of these two work.
Andrew
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
More information about the Lazarus
mailing list