[Gambas-user] Keyascii =0 ??
Rizky Tahara Shita
rizky at ...225...
Mon Jan 19 06:11:06 CET 2004
Hi,
i create a textbox on a form. i wanna validate on that textbox so that it
just can accept number only (yes ofcourse with key like backspace, enter,
escape, tab, capslock, numlock, shift, ctrl, alt, insert, home, end,
delete, pg up, pg down, arrows still can accepted), but it will not accept
alphabethic.
yes, it's easly to block just the number only for that textbox (and several
keys there), but i cannot block the alphabethic key.
this what i ment, when i press the 'a' button it still accept and show that
letter. while actually i don't wanna that letter not to show.
i have tried to replaced the textbox.text with the syntax:
textbox.text=left(textbox.text, len(textbox.text)-1)
when the alphabethic key are pressed. but, it still have bug when the
cursor isn't in the last of the word. it still can accept the alphabethic...
in vb i can do that with keyascii=0, since gambas use key as class (CMIIW)
so what should i do then ? have any sample code ?
Regards,
tahara!
More information about the User
mailing list