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

Ron ron at ...1740...
Sat Feb 27 10:40:59 CET 2010



Keith Clark wrote:
> I have a text box where data is entered via a bar code scanner.  The
> scanner adds an <enter> code at the end of the data.
>
> I want that <enter> to trigger some code.  What "event" is triggered by
> that, if any.
>
> Thanks,
>
> Keith
>   
I use the change event in my project, and check on the correct 
barcode/string lenght before I do something with it.

PUBLIC SUB txtBarcode_Change()

IF Len(txtBarcode.Text) = 13 OR Len(txtBarcode.Text) = 8 THEN

ELSE

END IF

See here for the complete subroutine:
http://www.domotiga.nl/browser/trunk/DomotiGa/FBarcodes.class#L86

Regards,
Ron_2nd.




More information about the User mailing list