<Stn:TextBox Name='CodeInput'>
Description
The TextBox control is used for textual input in the user interface. This can be used to input a code as a customer identifier during a purchase, or for selection of articles based on names. The text box is defined as a separate control in the panel in which the customer shall be able to enter text.
Properties
Alignment
Value: | Near, Center, Far |
Description:The Alignment property defines the horizontal justification of the text inside the text box.
Near = Left justified.
Far = Right justified.
Center = Centred.
Characters
Type: | string |
Description:String of allowed characters. If empty or not assigned all characters are allowed. E.g. “0123456789” only digits
Font
Type: | Font formatting string. See Fonts for available |
Description: | The Font property defines the font used to render the text on the display as well as the size of the text and the font style. This property can be set for each text box. Font name, font size and style are all set with the format: “FontName, FontSize, style=FontStyle”. A typical example is: “Arial, 24pt, style=Regular”. |
You can use any custom True Type font by placing the font file in the folder “\Storage Card\Media\Fonts\” and using the font name for that particular font file.
Height
Type: | Unsigned integer with value range: 0–128 |
Description:Sets the height of the text box in pixels when presented on the display.
If the text doesn’t fit in the specified height (font size is too big) no text will be rendered to the text box at all. Try to increase the box height to make the text fit inside the text box.
Location
Type: | String in format “X, Y” where X and Y are both unsigned integers. |
Value: | Value range for X is 0 – 260 value range for Y is 0 – 128. |
Description:The Location property specifies where the text box shall be positioned in relation to the parent control. If a text box is defined in a panel the Location property will specify where inside the panel the text box will be positioned. The physical location in the display then depends on where the panel is placed (panels also have a Location property) and where the text box is placed within the panel.
MaskChar
Type: | One single character |
Description:The MaskChar property enables the masking of a single character which will be replaced in the display by the character defined. If ‘#’ is set as mask character all characters in the text box will be replaced with “#”.The MaskChar property will only be applied when the input is rendered to the display. The actual character is still stored and used by the software.
MaximumLength
Type: | Unsigned integer with value range 1–100 |
Description:Defines the maximum number of characters than can be entered in the text box. If this maximum is reached all text entered will be ignored.
MinimumLength
Type: | Unsigned integer with value range 0–100 |
Description:Defines the minimum length of the input (in number of characters) before the input can be accepted. If the button used to accept the input has Name=”CodeDoneButton”, the button will be invisible or inactive until this minimum number of characters has been received.
Name
Type: | String of any length |
Description:The identifier of the text box. If a text box shall be used to input characters from the piezo keyboard, the Name property must be set one of the following:
•UserIdentifierInput
•PersonalAccountIdentifierInput
•ArticleNameInput
•PersonalAccountPinInput
•AccessControlInput
To make it possible for the software to find the text box.
This implies that only one text box of each name be used for character input in each panel because the Name property must be unique within each panel.
PurchasePreRequisitesIdentifierInput
Type: | String |
Description:Textbox name connected to Purchase pre-requisites identifier input
RegEx
Type: | string |
RegExValidExample
Type: | string |
Description:This parameter contains an example of what the RegEx result should look like
Example: | RegEx="^[A-Za-z]{3}[0-9]{3}$" |
RegExValidExample="ABC123"
The STN UI needs to add the popup label InputTextBoxOffTrackLabel to the panel to be displayed when the input does not match the expected format
SubstituteChar
Type: | One single character |
Description:Use SubstituteChar property in combination with TextPattern (see above) to create a pattern for the text input that is replaced with the real characters entered.
If TextPattern is set to “_ _ _ _” and SubstituteChar is set to “_”, the underscore characters will be replaced one by one by the characters entered in the text box.
If A is entered as this first character in the text box, “A _ _ _” will be rendered in the display.
If B is the second character, the string “A B _ _” will be rendered in the display.
TextModeName
Value: | WhiteText, BlackText |
Description:The TextModeName property defines if the text shall be presented in black (default) or in white. If the text is rendered in white, the background of the text box will automatically be black.
White text is the default mode if TextModeName has not been set for the text box.
TextPattern
Type: | A string |
Description:Use TextPattern in combination with SubstituteChar (see below) to create a pattern for the text input that is replaced with the real characters entered.
If TextPattern is set to “_ _ _ _” and SubstituteChar is set to “_”, the underscore characters will be replaced one by one by the characters entered in the text box.
If A is entered as this first character in the text box “A _ _ _” will be rendered in the display.
If B is the second character, the string “A B _ _” will be rendered in the display.
Width
Type: | Unsigned integer with value range 0–260 |
Description:The Width property defines the width of the text box in pixels when shown on the display.
If a too small value is given, some text might not fit inside the box. You can adjust width, font size or height to make the text fit inside the box.
Examples
The example is named “CodeInput” to allow the software to insert all characters entered from the piezo keyboard into it. The text box is defined to occupy 100 pixels in width and 16 pixels in height. The text pattern is “_ _ _ _” to clearly state that four characters shall be entered. Both the MinimumLength and MaximumLength properties are set to 4 to tell the text box that the minimum and maximum number of characters is 4.
<Stn:TextBox Name='CodeInput'
Location='123, 81'
Width='100'
MinimumLength='4'
MaximumLength='4'
TextPattern='_ _ _ _'
Height='16'/>