Please enable JavaScript to view this site.

CWT User Interface Design Handbook

Navigation: STN controls > ListView (STN)

Button Click actions

Scroll Prev Top Next More

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:

Description:

OnArticleSelectInListView

Description:Used to confirm the current selection of article. This applies the selected article in the list.  

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:

<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='RightTwo'
  Click='{ArticleSelectionListView.OnSelectPreviousItem}'/>
 
<Stn:Button Name='DownButton'
  Text='Down'
  ButtonLocationName='RightThree'
  ClickSound='\Storage Card\Media\sound\button.wav'
  Click='{ArticleSelectionListView.OnSelectNextItem}'/>
 
<Stn:Button Name='StepInListButton'
  Text='Step'
  ButtonLocationName='RightOne'
  ClickSound='\Storage Card\Media\sound\button.wav'
  Click='{ArticleSelectionListView.OnSelectNextItemWithWrapAround}'/>

Note:
the value of the Click-properties on the Buttons which have the ListView name as a prefix followed by a dot and the actual click event handler according to the table above.