ColorSelect
(System Library)
Description: | Color Selection Tool. This module draws a color selection button and its accompanying display area. |
Returns: | Nothing |
Usage: | Steady State only. |
Function Groups: | Color, Graphics |
Related to: | Bevel | CheckBox | DropList | DropTree | Edit | GridList | HScrollbar | Listbox | RadioButtons | SpinBox | SplitList | TextBox | ToolBar | VScrollbar |
Format: | System.ColorSelect(X1, Y1, X2, Y2, Color [, BtnLabel, BtnOnLeft, Standard, VertAlign, FocusID, OpenDialog, NoTrans, BGColor, FGColor, ShowIndex]) |
Parameters: |
X1 | ||||||||
Required. Any numeric expression giving the X coordinate on the screen of one side of the button or color display area. The smaller of values X1 and X2 will always be the left side. | ||||||||
Y1 | ||||||||
Any numeric expression giving the Y coordinate on the screen of either the top or bottom of the button and color display area. The smaller of values Y1 and Y2 will always be the top. | ||||||||
X2 | ||||||||
Required. Any numeric expression giving the X coordinate on the screen of the side of the button or color display area opposite to X1. | ||||||||
Y2 | ||||||||
Required. Any numeric expression giving the Y coordinate on the screen of the top or bottom of the button and color display area, whichever is the opposite to Y1. | ||||||||
Color | ||||||||
Required. The variable whose value is set to the index of the chosen color. | ||||||||
BtnLabel | ||||||||
Optional. Any text expression to be used as a label on the color selection button. No default if missing or Invalid. | ||||||||
BtnOnLeft | ||||||||
Optional Any logical expression. If true (non-0) the button will appear to the left of the color display area, If false (0) it will be to the right. The default value is true. | ||||||||
Standard | ||||||||
Optional Any logical expression, If true (non-0) the button and color display area will be standard system size. If false (0) they will be sized to fit their boundaries and VertAlign will be ignored. The default value is true. | ||||||||
VertAlign | ||||||||
Optional Any numeric expression that sets the vertical alignment of the button and display area according to one of the following options:
If Standard is true, this parameter is ignored. The default value is 0, top alignment. |
FocusID |
Optional Any numeric expression from 0 to 32767 for the focus number of the button. If this value is 0, the current value of Color will still be displayed, but it will not be able to be set because the button will appear grayed out. The default value is 1. |
OpenDialog |
Optional Any logical expression. If true (non-0) the dialog will be open. If false (0), it will be closed. The default is true. |
NoTrans |
Optional Enables you to turn off the transparent color option. If NoTrans is set to true (1), then the transparent color option will be turned off. If NoTrans is set to false (0), then the transparent color option will be turned on. (The transparent color option is set within the color selection dialog using the "Transparent" (or "Transparent Brush" or "Transparent Pen") check box.) No default value is provided. |
BGColor |
Optional. Any numeric expression for the background color of the control. No default value. |
FGColor |
Placeholder for the foreground color of the control. Not currently implemented. |
ShowIndex |
Optional. Color index is shown when TRUE. Defaults to TRUE if not specified. |
Comments: |
This module is a member of the System Library, and must therefore be prefaced by \System. as shown in the "Format" section. If your application predates version 11.2, use the backslash notation rather than dot: \System\ If the button and display area are set to be standard size, the button size will remain a constant size (101 x 31 pixels) regardless of the boundaries of the defined area, but the display area will vary between a minimum (square) size to a maximum length equal to the length of the button, depending on the size of the bounding area. After the maximum display area size has been reached, the button and area will be fully justified to cover the entire width of the defined area (the vertical alignment will be set by the value of VertAlign). For any optional parameter that is to be set, all optional parameters preceding the desired one must be present, although they may be invalid. |
Examples:
System.ColorSelect(10, 300, 210, 200 { Location of btn/display }, MyColor { Variable storing color }, "Set Pipe Color" { Button label }, 1 { Button on left }, 1 { Standard sizing }, 1 { Center btn/display }, 3 { Focus ID of button });