User Interface Controls > Common Properties > Layout > Types > Slider |
A slider control is used to place a slider on the rollout, as an alternative to a spinner. The user can drag the slider's pointer around to set its value.
slider <name> [<caption>] [range:[min,max,val]] [type:<#float | #integer>] [ticks:10][orient:<#horizontal | #vertical>] [height:80] [controller:(<controller>)] [toolTip:<string>]
The default alignment of slider items is #center .
A Point3 value containing the minimum, maximum and initial values for the slider in the x, y, and z components, respectively. Defaults to [0,100,0].
The type of the slider, #float or #integer . Defaults to #float .
The layout orientation of the slider in the rollout, either #vertical or #horizontal . Defaults to #horizontal .
height:
Specifies the slider height when orient:#vertical is specified.
Specifies how many ticks to place along the slider bar. No ticks are drawn if you specify ticks:0 . Defaults to 10.
Links the slider to the specified controller. This can be a new controller or 'undefined' to disconnect. This lets you establish a direct link between the slider and the controller. Changes to the slider will automatically update the controller (and its controlled objects). Changes to the controller automatically update the slider. This feature was previously available for spinner controls only. Available in 3ds Max 8 and higher.
Specifies the tooltip text to be displayed when the mouse hovers over the slider.
Available in 3ds Max 2010 and higher.
The current range and value for the slider, as a Point3 like the range: parameter.
The current value of the slider.
The number of ticks along the slider.
Get/set the tooltip text to be displayed when the mouse hovers over the slider.
Available in 3ds Max 2010 and higher.
Called when the user moves the slider pointer. The <arg> argument contains the new value of the slider.
Called when the Slider control is right-clicked.
Available in 3ds Max 2010 and higher.
Called when the user first clicks the slider.
Called when the user releases the slider.
The buttonDown and buttonUp events effectively notify you of the start and end of a slider "twiddle", allowing you to perform some setup for the adjustment. A typical use for this is to bring scene nodes that are being modified in the on <slider> changed handler into the foreground plane to speed up screen redraw.
The boolean argument puts the scene node(s) into the foreground plane if true , or into the background plane if false .
You should be judicious in putting objects in the foreground plane, because putting too many objects in the foreground plane reduces the foreground plane's effectiveness. Remember to return objects to the background plane when you don't need to interactively control them any more.