User Interface Controls > Common Properties > Layout > Types > Colorpicker |
A colorpicker control is used to place a 3ds Max color selection swatch on the rollout. The user can click the swatch to display a Color Selector dialog or drag colors to or from it.
colorpicker <name> [ <caption> ] [color:<color>] [alpha:<boolean>] [fieldWidth:<number>] [height:<number>] [modal:<boolean>] [title:<string>] [toolTip:<string>]
The default alignment of colorpicker items is #left .
In this example, the color picker is set to non-modal, which means that changing the color value will change the wireframe color of all selected objects instantly and interactively. Setting modal: to true would let the user adjust the color without feedback in the viewports and assign the result using the OK button.
Initial color of the swatch. Defaults to blue.
The title displayed on the Color Selector dialog. Defaults to "Choose a color".
The width in pixels of the swatch. Defaults to 40.
The height in pixels of the swatch. Defaults to 16.
By default, the color picker is declared as modal which prevents key strokes from being passed to 3ds Max. When the keyword argument modal: is set to false , the color picker will enable the shortcuts.
When set to true , clicking the color swatch brings up the color picker with alpha support. Defaults to false . If the color swatch is tied to an #acolor of #point4 parameter, this parameter is automatically set to true . Available in 3ds Max 6 and higher.
toolTip:
Provides text for a tooltip for the colorpicker; no tooltip if unsupplied.
When set to true , clicking the color swatch brings up the color picker with alpha support.(Previously available in 3ds Max 6 as construction parameter only).
Called when the user selects a new color in the open Color Selector dialog for this swatch or drops a new color on it. The <arg> argument contains the newcolor.