Syntax
| DlgListBoxArray DlgItem|$, StrArray$( )
-or-
DlgListBoxArray(DlgItem|$[, StrArray$( )])
| ||||||
---|---|---|---|---|---|---|---|
Description
| Instruction: Set the list entries for DlgItem|$.
Function: Return the number entries in DlgItem|$'s list.
This instruction/function must be called directly or indirectly from a dialogfunc. The DlgItem|$ should refer to a ComboBox, DropListBox, ListBox or MultiListBox.
| ||||||
See Also
| |||||||
Example
| Dim lists$()
Sub Main
ReDim lists$(0)
lists$(0) = "List 0"
Begin Dialog UserDialog 200,119,.DialogFunc
Text 10,7,180,14,"Please push the OK button"
ListBox 10,21,180,63,lists(),.list
OKButton 30,91,40,21
PushButton 110,91,60,21,"&Change"
End Dialog
Dim dlg As UserDialog
dlg.list = 2
Dialog dlg ' show dialog (wait for ok)
Debug.Print dlg.list
End Sub
Function DialogFunc%(DlgItem$, Action%, SuppValue%)
Select Case Action%
Case 2 ' Value changing or button pressed
If DlgItem$ = "Change" Then
Dim N As Integer
N = UBound(lists$)+1
ReDim Preserve lists$(N)
lists$(N) = "List " & N
DlgListBoxArray "list",lists$()
DialogFunc% = True 'do not exit the dialog
End If
End Select
End Function
|