This function will bring up a dialog with a Sliders and Edit field allowing the user to select a value for a Color Space Component. By specify the Color Space and the Component parameters, the Slider will automatically adjust to only allow Values in the correct range for that Component. The InitialValue tells the Slider where to begin when the dialog opens. The optional AttachToObject parameter will allow you to attach the Slider dialog to an object on your Layout in much the same way a Drop Down List can be attached to a field. If you specify the optional HexColor parameter, a Color chip will also appear allowing the user to see in realtime how their adjustments are changing the color.
|Format||MMColor_ShowSlider ( ColorSpace ; Component ; InitialValue ; AttachToObject ; HexColor )|
The Color Space to that contains the Component you want to adjust.
The Component to adjust with the Slider.
The Initial Value of the Component you are adjusting. (This value is also returned if the Slider is canceled with the Esc key.)
If you specify “True”, the slider will attach itself to the active field. If you specify an object name, it will attach itself to that object in FM 8.5 and above."
The Color you are adjusting. (If you specify this parameter, the Slider will include an updating color block.)
- Example 1
Brings up the Slider dialog at the current Mouse Cursor location and allows you to adjust the Blue Component. It then returns whatever Blue value was chosen.
MMColor_ShowSlider( "RGB" ; "Blue" ; 127 )
- Example 2
Brings up the Slider dialog aligned to the bottom and left of the Layout Object named "AdjustHueButton". The dialog will have a Color chip on it allowing the user to see the change to the Hue value in realtime. It then returns whatever new Hue was chosen.
MMColor_ShowSlider( "HSL" ; "Hue" ; 323 ; "AdjustHueButton" ; "D4007F" )