cancel
Showing results for 
Search instead for 
Did you mean: 

MultiListBox Selection Size - UI API

Siemens Creator Siemens Creator
Siemens Creator

Is the MultiListBox hard coded to only allow selection up to 1000 items?

3 REPLIES

Re: MultiListBox Selection Size - UI API

Valued Contributor
Valued Contributor

I have just tried and I can select more then 1000 items easily in a MultiListBox using either shift or ctrl.

 

This is the API code I used:

 

Sub Main

'create 2000 lists
    Dim lists$(2000)
    Dim j As Integer
    For j = 0 To 2000-1
lists$(j) = "ListItem" & j
    Next

	Begin Dialog UserDialog 200,231 ' %GRID:10,7,1,1
		text 10,7,180,14,"Please push the OK button"
		MultiListBox 10,28,180,154,lists(),.List
		OKButton 80,196,40,21
	End Dialog
    Dim dlg As UserDialog
    dlg.List = Array (2)
    Dialog dlg 'show dialog
    Debug.Print
End  Sub
Maarten Elings | Mechanical Engineer

Re: MultiListBox Selection Size - UI API

Siemens Creator Siemens Creator
Siemens Creator
Sub Main

'create 2000 lists
    Dim lists$(2000)
    Dim j As Integer
    For j = 0 To 2000-1
lists$(j) = "ListItem" & j
    Next

	Begin Dialog UserDialog 200,231 ' %GRID:10,7,1,1
		text 10,7,180,14,"Please push the OK button"
		MultiListBox 10,28,180,154,lists(),.List
		OKButton 80,196,40,21
	End Dialog
    Dim dlg As UserDialog
    dlg.List = Array (2)
    Dialog dlg 'show dialog
    Debug.Print
	'==============================================
	' After selecting more than 1000 items,
	' Try using all the items
	'==============================================
	Dim i1 As Integer, i2 As Integer
	i1 = LBound(dlg.List): i2 = UBound(dlg.List)
	MsgBox "i1 = " & i1 & "    i2 = " & i2
	'==============================================
End  Sub

Re: MultiListBox Selection Size - UI API

Siemens Creator Siemens Creator
Siemens Creator

Solved in v11.4