stsColorPicker
Version 1.2.1
Sons of Thunder Software, Inc.
Description
The
stsColorPicker
DropTool is a simple but useful control that lets you set up a color swatch that brings up a color picker and displays/stores the color you pick.
Kind of DropTool
Behavior-based
Interface Support
Unless specifically stated, this control will function properly on all platforms, although its look-and-feel is intended for the platforms listed in the table to the left.
Custom | Mac OS X | Windows | Linux | iOS | Android |
Extra Features
"About" Stack | ||
"Inspector" Stack |
Screenshots
Square, |
Rectangle, |
Usage Notes
When you click on the swatch, it "pushes in" to the depths of its shadow and then "pops out" when you release it. The swatch can be resized, but is limited to a square or rectangular shape.
The following tables show you how to interact with the DropTool from your scripts:
Custom Properties
Property | Possible Values | Notes |
uSTSColorPicker["color"] | Any valid RGB, hex, or LiveCode color name | You can both set and get the swatch color with this property. |
uSTSColorPicker["shadowOffset"] | An integer > 0 | Determines the drop shadow for the control. Set it to 0 to have no drop shadow. |
uSTSColorPicker["disabled"] | "true" or "false" | Shows the control in a disabled or enabled state (since just setting the "disabled" of the control itself doesn't do anything). It uses the values from the next three 'disabled' custom properties to draw the disabled state (or defaults if those can't be determined). |
uSTSColorPicker["disabledBackgroundColor"] | Any valid RGB, hex, or LiveCode color name | Sets the fill color to be used when the uSTSColorPicker["disabled"] property is set to "true". Defaults to RGB(210,210,210) if invalid or not found. |
uSTSColorPicker["disabledBorderColor"] | Any valid RGB, hex, or LiveCode color name | Sets the border color to be used when the uSTSColorPicker["disabled"] property is set to "true". Defaults to RGB(193,193,193) if invalid or not found. |
uSTSColorPicker["disabledShadowColor"] | Any valid RGB, hex, or LiveCode color name | Sets the shadow color to be used when the uSTSColorPicker["disabled"] property is set to "true". Defaults to RGB(225,225,225) if invalid or not found. |
Messages Sent
Message Sent | When Sent |
stsColorPick | Sent to the control after the user has selected a color. The first (and only) parameter is the color selected by the user. |
Version History
1.2.1 | 01-09-2012 |
|
1.2 | 11-06-2011 |
|
1.1 | 10-06-2011 |
|
1.0 | 08-04-2011 | First public version. |