<TFT:ListView def:Name="LanguageSelectionListView"
Description
The ListView control is used to display a list with selectable items. The ListView can be used to select a language in the user interface, to select Paymentservice, Article and TariffPackage (PAT, see CWT configuration handbook). It will also display a list of registered Codes (e.g. License plates) when used with Personal Accounts. The number of items in the ListView is dynamic and the content is populated from the CWT configuration file or retrieved from WebOffice.
Note: The ListView Element is used in the CWT Compact Colour display. The Touch display commonly uses a scrollbar when the list extends the length of the visible display size. In cases where the scrollbar cannot be displayed you can use buttons to scroll up and down. |
The ListView control must be named according to the type of selection to be made:
List types
ArticleSelectionListView
Description:Populated with available articles in the terminal.
CodeSelectionView
Description:Populated with available codes assigned to an online personal account.
CountrySelectionListView
Description:Populated with COUNTYRLIST from cwtconfig.xml. List can be filtered by using CountryInitialsInputPanel
ExternalPayUnitListView1
Description:The listView is populated and controlled by external pay unit.
The listView is common for all external pay units; Ext0,…,Ext3
ExternalPayUnitListView1 _Ext0 to ExternalPayUnitListView1_Ext3,
Description:The listView is the specific list for each external pay unit Ext0,…,Ext3
GeneralInputListView
Populated with available General Inputs key-value pairs. Can be used as a Summary of General Inputs. The key is translated via translation.xml when presented in GlobalInputListView.
GeneralInputKeyListView
Populated with available General Input Keys. Used in combination with GeneralInputValueListView.
GeneralInputValueListView
Populated with available General Input Values. Used in combination with GeneralInputKeyListView.
LanguageSelectionListView
Description:Populated with all available languages in the terminal.
PaymentServiceSelectionListView
Description:Populated with available payment services in the terminal.
TariffPackageSelectionListView
Description:Populated with available tariff packages in the terminal.
Note: the value of the Click-properties on the Buttons must have the name of the list type to use (List Type Name in the table above) as a prefix followed by a dot and the correct click event handler as listed in the Button Click actions. Click='{List Type Name.event handler}' e.g: <TFT:Button Name='DownButton' ... Click='{ArticleSelectionListView.OnSelectNextItem}'/> |
Properties
Height
Type/Value: Unsigned integer. Value range 0 – 128.
Description:Defines the height of the list view on the display.
ItemHeight
Type/Value: Unsigned integer. Value range 12 – 128.
Description:Defines the height of each item in list. The y coordinated of each item is caculated by y= row number × ItemHeight + VerticalSpace;
Location
Type/Value: String in format “X,Y” where X and Y are both unsigned integers. Value range for X is 0 – 260 and value range for Y is 0 – 128.
Description:The Location property specifies where the list view shall be placed in relation to the parent control. The Location property specifies where inside a panel the list view will be located. The physical location on the display will then depend on where the panel is placed (Panels also have a Location property) and where the list view is positioned.
Name
Type/Value: A string of any length
Description:The name of the list view control as listed in the table above. Remember that Name must be unique within a panel.
Selectable
Type/Value: Boolean, “true” or “false
Default: | true |
Description:If the items in the list view is selectable.
SelectedBackColor
Type/Value: A string with a valid colour name
Description:Defines the background color of the selected item. By default background color of the selected item is the ListView foreground color (color of text). See Colour names for a complete list of available colour names.
SelectedForeColor
Type/Value: A string with a valid colour name
Description:Defines the foreground color (color of text) of the selected item. By default foreground color of the selected item is the ListView background color. See Colour names for a complete list of available colour names.
Separator
Type/Value: A string
Description:Used be GeneralInputListView. Defines the string between <key> and <value> when Global Inputs are presented. Default is “: “
VerticalSpace
Type/Value: Unsigned integer. Value range 0 – 128.
Description:Defines the vertical offset space for the first row in the list. The y coordinated of each item is calculated by y= row number × ItemHeight + VerticalSpace;
Width
Type/Value: Unsigned integer. Value range 0 – 260.
Description:Defines the width of the list view on the display.
SUB-elements
The table below lists the sub-elements that can be defined in a ListView control. The sub-elements add other controls to the form which creates a keyboard mapping for physical buttons in the terminal. One of the sub-elements also adds a software DLL reference that is used when connecting actions to buttons, etc.
Sub-element: Controls
Description:The Controls sub-element contains Images in the ListView. see Images in ListView.
Example:
<TFT:ListView
def:Name='ArticleSelectionListView'
ItemHeight='13'
Width='85'
Height='70'
VerticalSpace='5'
Location='30, 30'/>
<TFT:Button
Name='UpButton'
Text='Up'
ButtonLocationName='RightTwo'
Click='{ArticleSelectionListView.OnSelectPreviousItem}'/>
<TFT:Button Name='DownButton'
Text='Down'
ButtonLocationName='RightThree'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItem}'/>
<TFT:Button Name='StepInListButton'
Text='Step'
ButtonLocationName='RightOne'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItemWithWrapAround}'/>