CreateListBoxTextΒΆ
CreateListBoxText creates the iniatialize string for list boxes and combo boxes.
-
ssComboInit = CreateListBoxText(svList)
-
ssComboInit = CreateListBoxText(svList, svSel)
-
ssComboInit = CreateListBoxText(svList, rvSelIndex)
Return Value
ssComboInit is a scalar string which can be used to initialize list boxes and
combo boxes. Elements are separated by \0x01
characters. The selection is
separated by a \0x02
character.
Parameters
-
svList
svList is a string vector with the elements of the list box.
-
svSel
svSel is a string vector with the elements which should displayed as selected. The elements must exist in the svList vector.
-
rvSelIndex
rvSelIndex is a vector with indices of the elements that are displayed in the dialog control as selected.
Example
The separator characters are not displayed in the command window. They are visible during debugging in the tooltip.
* svInit = ["Adam", "John", "Mary", "Jimmy"];
* ssInit = CreateListBoxText(svInit, svInit[2,4]);
* ssInit
\x01Adam\x01John\x01John\x01Mary\x01Jimmy\x02John\x01Jimmy
* svSel = GetListBoxText(ssInit);
* svSel'
John
Jimmy
* <svList, svSel> = GetListBoxText(ssInit);
* svList'
Adam
John
Mary
Jimmy
History
Version | Description |
---|---|
4.2.2 | New |
5.3.0 | New Parameter rvSelIndex. |
See also
id-1694839