[Gambas-user] Text box event triggered by <enter>

charlesg charles at ...1784...
Sat Feb 27 08:49:23 CET 2010


Hi

I use this:


> '---------------------------------------------------------
> PUBLIC SUB txtBarcode_KeyPress()
>   IF InStr("1234567890", key.text) = 0 THEN 
>     STOP EVENT 
>   ENDIF 
> END
> '---------------------------------------------------------
> PUBLIC SUB txtBarcode_KeyRelease()
>   SELECT CASE key.Code
>     CASE key.Enter, key.return
>       evalBarcode 'function below
>     CASE key.Left
>       txtPlus.SetFocus
>     CASE key.Delete
>       txtBarcode.text = ""
>     CASE key.BackSpace
>         txtBarcode.text = ""  
>   END SELECT 
> END
> '---------------------------------------------------------
> 

I'm not sure I can explain why the keypress event doesn't kil the <enter>
but it doesn't. Works all day every day.

rgds
-- 
View this message in context: http://old.nabble.com/Text-box-event-triggered-by-%3Center%3E-tp27725597p27726295.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list