[Gambas-user] "locking" of a textbox
Carlier Laurent
lordheavy at ...512...
Sun Jul 4 12:10:44 CEST 2004
>PUBLIC SUB TextBox_KeyPress()
>
> 'message.Info(Str(key.code)) 'with this unmarked you can easy see the codes
> IF key.code < 48 OR key.Code > 57 THEN
> message.Info("Please enter figures only!")
> ENDIF
>END
>
> Yes it's possible and simply in gambas :
>
> PUBLIC SUB TextBox1_KeyPress()
>
> IF Instr("0123456789", key.Text ) = 0 THEN STOP EVENT
>
> END
>
thanks for pieces of code !
More information about the User
mailing list