:Revision=2;
:html
<<
128.111
Keyboard-Scanner-Object|KeyBScanner
--
The IP-Object Keyboard allows to show an input dialog for a keyboard scanner. Naturally, the inputs can be entered in this window also without scanner, by the keyboard.
>>
<<
128.111.1
KeyBScanner.Setup|Setup
--
<!DEF>
procedure <!TW>KeyBScanner.Setup ( rMinLen, rMaxLen : real [; sAllowedChars : string [; sFontName : string [; rFontSize : real [; sFontOptions : string]]]]);
<!TXT>
Changes the specifications of the input dialog.

 <!PW>rMinLen and <!PW>rMaxLen define the minimal resp. maximal length of the barcode (in characters). <!PW>rMinLen and <!PW>rMaxLen may be identical.

 <!PW>sAllowedChars selects, which characters are allowed in the barcode (important, when the code is entered manually). Either state all allowed characters or use '..' to abbreviate ranges.

 <!PW>sFontaName, <!PW>rFontSize and <!PW>sFontOption to setup the font.
 ('b' for Bold, 'i' for Italic, 'u' for Underline and 's' for Strikeout)

Examples:
<!CODE>
  KeyBScanner.Setup (12, 12, '0123456789');                 // 12 numerical digits
  KeyBScanner.Setup (12, 12, '0..9');                       // same as above
  KeyBScanner.Setup (10, 12, '0..9A..Z');                   // 10 to 12 digity or capital letters
  KeyBScanner.Setup ( 1, 12, #32'..'#255);                  // 1 to 12 printable characters
  KeyBScanner.Setup ( 1, 12, '0..9', 'Verdana', 48, 'bi');  // setup the font
<!TXT>
>>

<<
128.111.2
KeyBScanner.Show|Show 
!128.111.1
--
<!DEF>
function <!TW>KeyBScanner.Show [( sTitle : string)];
<!TXT>
Displays the input dialog and waits for any characters via keyboard or scanner.  

Any charcaters which are not within the range of allowed characters, will be ignored.

The dialog can be closedanytime with ESC.  In this case the return value is an empty string (''). 

Otherwise the dialog can be closed with Return (by scanner or by keyboard), if the input field contains a number of characters, which is inbetween the minimum- and maximum length set by <!RW>KeybScanner.Setup. The return value in this case is the input barcode (without Return)

>>

