Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-06

how to pass barcode value to a TEdit component

13 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

zeljko
to Johan Tu Toit
Johan Tu Toit wrote
hi all, please i would like to know how to pass a value read by a barcode scanner to a TEdit component. thanks
Just pass it. It's pure text and usualy have CRLF at the end.
MyEdit.Text := SomeStringFromBarCodeScannerReader;

z.

Reply by email

Johan Tu Toit
to Marius

so once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?

Marius wrote 16 lines
Johan Tu Toit wrote: >hi all, please i would like to know how to pass a value read by a >barcode scanner to a TEdit component. thanks Most barcode readers past the text via the keyboard so all you need todo is set the focus into the edit *unless you are using a comport scanner which are becoming rare these day's) -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Giuliano Colla
to Johan Tu Toit
Johan Tu Toit wrote
so once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?

Yes, it's as simple as that, provided you have set up your scanner to behave as a keyboard (which is the standard behavior for most scanners). You may verify it with any text editor: open a text editor, then trigger your barcode scanner, and you should see the value read into your editor window. If it works, then it will work also with your myedit.text.

Giuliano

Reply by email

Johan Tu Toit
to Giuliano Colla

so a usb barcode scanner can be setup to have a keyboard behavior?

Giuliano Colla wrote 21 lines
On 06/23/2013 06:06 PM, Johan Tu Toit wrote: > so once the focus in the myedit.text has been made, and the barcode > scanner button has been triggered, the myedit.text received the value > read from the barcode been scanned? Yes, it's as simple as that, provided you have set up your scanner to behave as a keyboard (which is the standard behavior for most scanners). You may verify it with any text editor: open a text editor, then trigger your barcode scanner, and you should see the value read into your editor window. If it works, then it will work also with your myedit.text. Giuliano -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Marius
to Zaher Dirkey
Zaher Dirkey wrote 9 lines
On Sun, Jun 23, 2013 at 10:07 PM, zeljko wrote: > so a usb barcode scanner can be setup to have a keyboard behavior? >> > > Yes ??Not all, some have special DLL, or emulate COM port.

That is still possible wiith most scanners, but using it as a comport makes it also a unique resource which cannot be shared with multiple applications. Not sure if Johan wants its that way

Reply by email

Zaher Dirkey
to Johan Tu Toit: so a usb barcode scanner can be setup to have a keyboard behavior?
Johan Tu Toit wrote
so a usb barcode scanner can be setup to have a keyboard behavior?

?It is depends on your barcode scanner?, if you will buy it then choose witch can do keyboard behavior.

Best Regards
Zaher Dirkey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130623/781ea73a/attachment.html>

Reply by email

Johan Tu Toit
to Zaher Dirkey

i will buy it. its better to choose keyboard behavior and use the pc keyboard usb.

Zaher Dirkey wrote 12 lines
On Sun, Jun 23, 2013 at 9:17 PM, Johan Tu Toit wrote: > so a usb barcode scanner can be setup to have a keyboard behavior? It is depends on your barcode scanner, if you will buy it then choose witch can do keyboard behavior. Best Regards Zaher Dirkey

Reply by email

Graeme Geldenhuys
to Johan Tu Toit: so once the focus in the myedit.text has been made, and the barcode scanner button has…
Johan Tu Toit wrote
so once the focus in the myedit.text has been made, and the barcode scanner button has been triggered, the myedit.text received the value read from the barcode been scanned?

Yes, barcode scanners simply input what they read, as if it was typed with the keyboard. Think of the barcode scanner as an "alternative keyboard".

With some scanners you can often program them to auto add TAB, LINEFEED or ENTER after what they scanned. That behaviour is dependent on your software, and sometimes very handy.

Regards,
- Graeme -

Reply by email

Johan Tu Toit
to Graeme Geldenhuys

Thanks for all

Graeme Geldenhuys wrote 23 lines
On 23/06/13 17:06, Johan Tu Toit wrote: > so once the focus in the myedit.text has been made, and the barcode > scanner button has been triggered, the myedit.text received the value > read from the barcode been scanned? Yes, barcode scanners simply input what they read, as if it was typed with the keyboard. Think of the barcode scanner as an "alternative keyboard". With some scanners you can often program them to auto add TAB, LINEFEED or ENTER after what they scanned. That behaviour is dependent on your software, and sometimes very handy. Regards, - Graeme - -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130624/f7209d56/attachment-0001.html>

Reply by email