getIndex
Syntax
<Path>.getIndex(DialogItem:string) → integer |
The method getIndex returns the number of the item of type New List Box and the New Drop-Down List Box or the New Tab Page.
The method returns 0, when the drop-down list box does not contain any items. When it does contain items, and no item is selected, the method returns 1, i.e., the Dialog automatically selects the first item in the list.
When you assign another list, and if it is possible, the Dialog selects the item at the same position in the list box.
When you assign another list and it is not possible to select the same position in the list box that the previous selection had, the Dialog automatically selects the first item in the new list.
Parameter
The parameter DialogItem of data type string designates the list box, the drop-down list box or the tab. The leftmost tab has the number 1.
Return Value
The return value has the data type integer.
The method returns 0, when the drop-down list box does not contain any items. When it does contain items, and no item is selected, the method returns 1, i.e., the Dialog automatically selects the first item in the list.
Example
print MyDialog.getIndex("doors") |
Related Topics
Position of the item in the Items table
Related Topics
Methods of the DialogclearData
close (Dialog)
closeDialog (Dialog)
createButton
createCheckBox
createDropDownListBox
createEditTextBox
createGroupBox
createImage
createListBox
createListView
createMenu
createRadioButton
createStaticTextBox
createTabControl
createTabPage
getCheckBox
getIcon
getItemsList
getPasswordMasking
getTable (List View)
getTableRow
getUserDialogXYWH
getValue (Dialog)
open (Dialog)
openDialog (Dialog)
setCallbackArgument
setCaption
setCheckBox
setEditType
setGroupID
setIcon
setIndex
setList
setPasswordMasking
setSensitive
setTab
setTable (Dialog)
setTableRow
updateUserDialog