Please enable JavaScript to view this site.

CWT User Interface Design Handbook

Navigation: STN controls

KeyboardButton (STN)

Scroll Prev Top Next More

<Stn:KeyboardButton Name="RejectKeyboardButton"

Description

The KeyboardButton control is a button that is not presented on the display.

This button is used for mapping of keys in the piezo keyboard in the keyboard definition and also for creating buttons that are invisible, but still active, in the user interface.

This is the normal control used in the CWT 104 and CWT Compact Classic terminals because these products do not have any software controlled buttons on the sides or below of the display.

The KeyboardButton control uses the ButtonLocationName as a reference from the keyboard mapping. See Key mapping for information on how keys are mapped to positions and different functionality in the keyboard definition.

 

Properties

The values for the properties for the KeyboardButton element depend on the CWT model used. See the applicable section in Key mapping for more details.

ButtonLocationName

Only applicable for CWT 104 and CWT Compact Classic

Description:The ButtonLocationName property is used to connect a physical button with the corresponding button control.

Click

Type:A string of any length representing the function to call.

Description:The Click property defines the action to be performed when a customer presses the button.

See also: Button click-function lists all the available click actions.

ID

Type:integer

Description:physical key definition. see Key mapping

KeyValue

Type:Commonly only 1 character long representing the key depicted on the keyboard

Description:Used in combination with the Click property to specify the button behaviour when pressed. KeyValue is a generic string that has different uses depending on the click action specified.

See also:For information on how KeyValue is used, see the click action details in Button click-function.

Text

Only applicable for the CWT 2120 and CWT compact Touch
Type:A string of any length
Commonly only 1 character long representing the key depicted on the keyboard

Description:The Text property is used to define a static text rendered on top of the button control background rectangle.

 

Control information

See Key mapping for definition of click actions that can be used with the KeyboardButton control (same as those used for button control).

 

Example

This example defines a KeyboardButton control used as a reject button when the button is not rendered to the display (the normal case for the CWT 104 and CWT Compact Classic).

ButtonLocationName is still used for definitions of KeyboardButtons inside panels for reference from the keyboard definition. The click action is “OnReject” because the button shall act as a reject button to cancel active purchases. The Text property is not defined because nothing will be presented on the display when a KeyboardButton control is used:

<Stn:KeyboardButton Name="RejectKeyboardButton"
  Text=""
  Click="OnReject"
  ButtonLocationName="LeftFour"/>