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.
Note: - The Name attribute of the button with click event OnArticleSelectInListView cannot begin with “Article”. - The Name attribute of the button with click event OnPaymentServiceSelectInListView cannot begin with “PaymentService”. - The Name attribute of the button with click event OnTariffPackageSelectInListView cannot begin with “TariffPackage”. Use names like SelectArticle instead. See example below |
Article List View Example:
<Stn:ListView
def:Name='ArticleSelectionListView'
ItemHeight='13'
Width='85'
Height='70'
VerticalSpace='5'
Location='30, 30'
TextModeName='WhiteText'/>
<Stn:Button
Name='UpButton'
Text='Up'
ButtonLocationName='BottomOne'
Click='{ArticleSelectionListView.OnSelectPreviousItem}'/>
<Stn:Button Name='DownButton'
Text='Down'
ButtonLocationName='BottomTwo'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItem}'/>
<Stn:Button Name='StepInListButton'
Text='Step'
ButtonLocationName='BottomFour'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='{ArticleSelectionListView.OnSelectNextItemWithWrapAround}'/>
<Stn:Button Name='SelectArticle'
Text=''
ButtonLocationName='RightFour'
ClickSound='\Storage Card\Media\sound\button.wav'
Click='OnArticleSelectInListView'/>
the value of the Click-properties on the Buttons should have the ListView name as a prefix followed by a dot and the actual click event handler.
E.g. ArticleSelectionListView.OnSelectNextItem
Click events
OnArticleSelectInListView
Used to confirm the current selection of article. This applies the selected article in the list. Note: See note regarding button name below.
OnLanguageSelectionDone
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
Used to confirm the current selection of a payment service. This applies the selected payment service in the list. Note: See note regarding button name below.
OnSelectNextItem
Step down the selection in the ListView if not at the last entry. If the last entry is selected nothing happens.
OnSelectNextItemWithWrapAround
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
Step up the selection in the ListView if not at the top entry. If the top entry is selected nothing happens.
OnTariffSelectInListView
Used to confirm the current selection of tariff. This applies the selected tariff in the list. Note: See note regarding button name below.