[Gambas-user] "locking" of a textbox

Fabien Bodard gambasfr at ...11...
Sun Jul 4 11:30:39 CEST 2004


Le dimanche 4 Juillet 2004 11:07, lordheavy a écrit :
> Is there any way to "lock" a textbox with only numeric input ?
>
> like QLineEdit with QValidator ?
>
> Thanks !
>
> Lordheavy
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by Black Hat Briefings & Training.
> Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
> digital self defense, top technical experts, no vendor pitches,
> unmatched networking opportunities. Visit www.blackhat.com
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user


Yes it's possible and simply in gambas :

PUBLIC SUB TextBox1_KeyPress()
  
  IF Instr("0123456789", key.Text ) = 0 THEN STOP EVENT

END

It's a workaround that work well

Fabien Bodard




More information about the User mailing list