.. highlightlang:: us .. index:: CreateListBoxText .. _createlistboxtext: CreateListBoxText ================= .. us.tag CreateListBoxText ENGLISH New422 DialogBoxes :ref:`CreateListBoxText` creates the iniatialize string for list boxes and combo boxes. .. function:: ssComboInit = CreateListBoxText(svList) ssComboInit = CreateListBoxText(svList, svSel) ssComboInit = CreateListBoxText(svList, rvSelIndex) .. us.return **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. .. us.params **Parameters** .. uparam:: svList *svList* is a string vector with the elements of the list box. .. uparam:: svSel *svSel* is a string vector with the elements which should displayed as selected. The elements must exist in the *svList* vector. .. uparam:: rvSelIndex *rvSelIndex* is a vector with indices of the elements that are displayed in the dialog control as selected. .. us.example **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 * = GetListBoxText(ssInit); * svList' Adam John Mary Jimmy .. us.history **History** .. list-table:: :header-rows: 1 * - Version - Description * - 4.2.2 - New * - 5.3.0 - New Parameter *rvSelIndex*. .. seealso:: :ref:`overview-dialogboxes`, :ref:`DialogBox`, :ref:`GetListBoxText` :sub:`id-1694839`