All defined user-interface controls have a local variable constructed for them in the rollout and a value representing the control is placed in that variable. These values typically contain state information relevant to the item, such as if a check box is checked, the current spinner value, the items in a list box, and so on. This information is made available to you as various named properties on the item values. You use standard MAXScript property access to read and set these values,
FOR EXAMPLE |
|
enable the frab_x spinner |
|
set foo button text |
|
get item list from listbox baz |
|
get current value from spinner x_spinner |
All of the user-interface common properties except for caption (the label string value is used as the caption) can be specified as parameters when the user-interface item is constructed.
The meaning of this property varies depending on the specific user-interface item type. If the user-interface item has a caption, this property contains the caption string. For the various types of buttons, it is the text inside the button. The default value of the caption is the label string specified in the item definition.
For all the user-interface items except edittext and combobox , the .text property is an alias of the .caption property.
For edittext and combobox user-interface items, it is the text in the edit box.
The default text property value for edittext user-interface items is a null string ("").
The default text property value for combobox user-interface items is the selected item’s text.
The .text property in 3ds Max 7 and higher is really equivalent to the .caption property for all rollout controls that do not define .text separately.
Setting a label's text is the same as setting a label's caption. In previous releases, setting the text would not update the UI, but would update the internal .caption value
Sets whether the item is enabled for interaction when the rollout is initially opened. Disabled items appear unavailable in the rollout. All items are enabled by default, so you typically use this parameter to disable those items that should not initially be available to the user. For example, you might have some spinners that change the properties on a scene object that should not be changed until the user has picked the object, typically with a pickbutton in the rollout. You would disable the spinner in its definition, as in the following example, and enable it once the user picked an object.
This forces the user-interface item to a fixed [x,y] pixel position in the rollout, with [0,0] at the top-left corner.
When set to false , the UI Item is hidden and disabled.
<ui_item>.hwnd Integer, read-only
Contains an array of the HWND Window handles of the control's rollout if the rollout is open, or an empty array if the control's rollout is closed.