User Interface Controls > Common Properties > Layout > Types > Checkbutton |
A checkbutton control is used to place a press button on the rollout that has two states, on and off, just like a check box. The user can click to successively switch between states.
checkbutton <name> [<caption>] [ highlightColor:<color> ] \ [ toolTip:<string> ] [ checked:<boolean> ] [ images:<image_spec_array> ] \ [ border:<boolean> ]
The default alignment of checkbutton items is #center .
Initial state of the check button, defaults to off .
The background color of the check button in its pressed (or on) state, defaults to a light-gray wash in keeping with 3ds Max user-interface conventions.
Provides text for a tooltip for the check button (no tooltip if unsupplied).
An image-specification array for providing bitmap images for the check button. If this is specified, the <label> is ignored and the contents of the check button are replaced with the bitmaps.
images:#(<image>, <maskImage>, <count_integer>, <enabled_out_image_index>, <enabled_in_image_index>, <disabled_out_image_index>, <disabled_in_image_index>)
where <image> and <maskImage> can be either a bitmap file-name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four check button states.
FOR EXAMPLE: |
would use a rendering as the check button image, and |
would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the check button, respectively. See also Image Buttons. |
When set to true or not specified, the checkbutton will be drawn with a border. This was the default behavior prior to 3ds Max 2009.
When set to false, the checkbutton will be drawn without a border, making it one with the UI background. If the checkbutton is enabled, the border will appear when the checkbutton is pressed, checked, if its .checked property is set to true and upon mouseover.
Available in 3ds Max 2009 and higher.
The state of the check button, on ( true ) or off ( false ).
Sets the image-specification array for the check button. This property is write-only.
Setting the value to undefined will set the control back to displaying its caption rather than images in 3ds Max 8 and higher.
Get/set the tooltip string of the checkbutton.
Available in 3ds Max 9 and higher.
Called when the user clicks the check button to change its state. The <arg> argument will contain the new state of the check button, on ( true ) or off ( false ).
Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.