Description
Returns the name of the item, selected in a list box.
Syntax
retvalue = object.GetListStr (iIdx) |
object
Required. Object name, returned by Dim idlg As InputDlg = New InputDlg.
Idx
Index of the item.
Example
In this example, the message box displays the value of the combo entry, the idx of the selected item and the string of that combo entry, when you clicked Ok or pressed Return. The first item is 0, the second item is 1 and so on.
Dim idlg As InputDlg = New InputDlg
idlg.Title = "My title"
Dim combo As InputDlg.Combo = New InputDlg.Combo
combo.AddItem("Above", 456)
combo.AddItem("Below", 789)
Dim po = idlg.AddCombo("Position", combo, combo.ToIdx(789))
If idlg.ShowDialog Then ' if OK was clicked...
MsgBox(idlg.GetComboData(po) & vbCr & _
idlg.GetComboIdx(po) & vbCr & _
idlg.GetComboStr(po)) ' return the value of field with index iNum
End If
See also