Description
Determines the total number of items in a ListBox control.
Applies to
ListBox, DropDownListBox, PictureListBox, DropDownPictureListBox, and ListView controls
Syntax
listcontrolname.TotalItems ( )
Argument |
Description |
---|---|
listcontrolname |
The name of the ListBox, DropDownListBox, PictureListBox, DropDownPictureListBox, or ListView in which you want the total number of items |
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:
integer Total Total = lbx_Actions.TotalItems()
This FOR loop is executed for each item in lb_Actions:
integer Total, n Total = lb_Actions.TotalItems() FOR n = 1 to Total ... // Some processing NEXT
See also