User Interface Controls > Common Properties > Layout > Types > Combobox |
A combobox control is used to place a combo box list in the rollout. This is a variant of the drop-down list in which the list is always fully displayed in the rollout with an additional edit-text box at the top of the list where the current selection is placed and may be edited. The user can scroll the list or click to select an item in the list.
combobox <name> [ <caption> ] [items:<array_of_strings>] [selection:<number>] [height:<number>] [toolTip:<string>]
The default alignment of combobox items is #left .
The text string in the edit box.
The array of text strings that are the items in the list
The 1-based number of the currently selected item in the list. Defaults to 1.
The overall height of the combobox in number of item lines. Defaults to 10 lines. To have a combobox display exactly N items in the list, set height to N+2 .
The minimum height value is clamped to 1 line.
toolTip:
Provides text for a tooltip for the edit box of the combobox ; no tooltip if unsupplied. Available in in 3ds Max 2017 and higher.
The text of the optional caption above the combo box.
The currently selected item number, 1-based. If the items list is an empty array, this value is 0.
The text of the currently selected item. Can be used to replace individual items without resetting the entire items array. If the items list is an empty array, this value is undefined .
Get/set the width of the combobox list window in pixels.
Get/set the height of the combobox list window in pixels.
Called when the user selects an item in the combo box list. The <arg> argument contains the new current selection item number.
Called when the user double-clicks an item in the list. Note that the on selected handler is always called on single clicks and on the first click of a double-click. The <arg> argument will contain the number of the item double-clicked.
Called when the user changes the text in the edit box then changes the focus away from the edit box. This handler is not called if the user presses ENTER. The <arg> argument will contain the newtext in the edit box.
Called for each individual character change the user performs in the edit box. This handler is not called when the user presses ENTER or changes the focus away from the edit box. The <arg> argument will contain the new text in the edit box.
Called when the user right-clicks the Combobox control.
Available in 3ds Max 2010 and higher.