The ListView is controlled with Buttons with different click actions. The ListView has a couple of built-in click handlers that are convenient to use when navigating the ListView:
Click events
See Event management for additional click events
OnArticleSelectInListView
Description:Used to confirm the current selection of article. This applies the selected article in the list.
OnExternalPayUnitQuestionAnswerSelectInListView1WithoutHide
Description:Used to confirm the current selection of ExternalPayUnitListView1.
This applies the selected item in the list sent to external pay unit
Hiding of this popup is done by External Pay Unit when the next popup is shown.
OnLanguageSelectionDone
Description:Used to confirm the current selection of a language. This applies the selected language to the user interface and closes the language selection popup.
This click action is normally used in the language selection popup only.
OnPaymentServiceSelectInListView
Description:Used to confirm the current selection of a payment service. This applies the selected payment service in the list.
OnSelectNextItem
Description:Step down the selection in the ListView if not at the last entry. If the last entry is selected nothing happens.
OnSelectNextItemWithWrapAround
Description:Step down the selection in the ListView if not at the last entry. If the last entry is selected it will wrap around and select the top entry in the ListView.
OnSelectPreviousItem
Description:Step up the selection in the ListView if not at the top entry. If the top entry is selected nothing happens.
OnTariffSelectInListView
Description:Used to confirm the current selection of tariff. This applies the selected tariff in the list.
To use the built-in click handlers of a ListView it must be defined with a name that is accessible in the whole UI. This is accomplished with the def: keyword in front of the Name property. The name is then used when referring to the ListView in Click-properties of Buttons.
Example:
<TFT:ListView
def:Name='ArticleSelectionListView'
ItemHeight='13'
Width='85'
Height='70'
VerticalSpace='5'
Location='30, 30'
TextModeName='WhiteText'/>
<TFT:PiezeButton
Name='UpButton'
Text='Up'
ButtonLocationName='BottomOne'
Click='{ArticleSelectionListView.OnSelectPreviousItem}'/>
<TFT:PiezeButton Name='DownButton'
Text='Down'
ButtonLocationName='BottomTwo'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItem}'/>
<TFT:Button Name='StepInListButton'
Text='Step'
ButtonLocationName='BottonFour'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItemWithWrapAround}'/>
Note: the value of the Click-properties on the Buttons must have the ListView name as a prefix followed by a dot and the actual click event handler according to the table above. |