TotalItems
PowerScript function
Description
Determines the total number of items in a ListBox or
RibbonComboBoxItem control.
Applies to
ListBox, DropDownListBox, PictureListBox, DropDownPictureListBox,
ListView, and RibbonComboBoxItem controls
Syntax
1 |
listcontrolname.TotalItems ( ) |
Argument |
Description |
---|---|
listcontrolname |
The name of the ListBox, DropDownListBox, PictureListBox, |
Return value
Integer.
Returns the total number of items in listcontrolname. If
listcontrolname contains no items, TotalItems returns 0. If an error
occurs, it returns -1. If listcontrolname is null, TotalItems returns
null.
Examples
If lb_Actions contains a total of five items, this example sets
Total to 5:
1 2 |
integer Total Total = lbx_Actions.TotalItems() |
This FOR loop is executed for each item in lb_Actions:
1 2 3 4 5 |
integer Total, n Total = lb_Actions.TotalItems() FOR n = 1 to Total ... // Some processing NEXT |
This example gets the total item of the RibbonBar ComboBox:
1 2 3 4 5 6 |
Integer li_Return RibbonComboBoxItem lr_ComboBox li_Return = lr_ComboBox.AddItem("Item1") li_Return = lr_ComboBox.AddItem("Item2") li_Return = lr_ComboBox.TotalItems() |
See also