Product Logo

MMColor

Create and enhance color elements

Functions

MMColor_ShowColorSpaceSlider

NameMMColor_ShowColorSpaceSlider
Description

This function will bring up a dialog with 3 to 4 Sliders (depending on the Color Space) allowing the user to manipulate the sliders or type in literal values to get the exact color they want. The function then returns that color as a HexColor. 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.

Return TypeText (HexColor)
FormatMMColor_ShowColorSpaceSlider ( HexColor ; ColorSpace ; AttachToObject )
Required Parameters
HexColor

The Color you are adjusting.

ColorSpace

The Color Space to adjust with the Sliders.

Optional Parameters
AttachToObject

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."

Examples
Example 1

Brings up the Color Space Slider dialog at the current Mouse Cursor location and allows you to adjust the sliders. It then returns whatever color was chosen.

MMColor_ShowColorSpaceSlider( "FF00FF" ; "RGB" )
Example 2

Brings up the Color Space Slider dialog aligned to the bottom and left of the Layout Object named "ChooseColorButton". It returns whatever color was chosen.

MMColor_ShowColorSpaceSlider( "00FF80" ; "HSL" ; "ChooseColorButton" )