ChooseColor Method (Color)
9.0E, PLBCMP GUI Only
The ChooseColor method creates a color dialog that allows the user to select a color for a COLOR object. The method uses the following format:
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A COLOR object that has been created.
return
Optional. A Numeric Variable that indicates the success or failure of the method.
flags
Optional. A Numeric Variable or decimal number that specifies a bit map value that initializes the dialog box.
hwnd
Optional. A Numeric Variable or decimal number that specifies the owning window's handle. (9.7A)
Flags Affected: OVER, ZERO
Note the following:
This method sets the default color for the color dialog using the current object color setting.
The {return} value is set to zero when the user exits the color dialog box using the OK button.
If the value returned is zero, the ZERO Condition Flag is set.
If the {return} variable is too small to contain the result of the method, the OVER condition flag is set.
The default color of the dialog is set to the current color of the COLOR object.
The {flag} bit map settings initializes the color dialog with any combination of the following bit map values:
|
Value |
Keyword |
This flag bit setting ... |
|
0x2 |
CC_FULLOPEN |
causes the dialog box to display the additional controls that allow the user to create custom colors. If this flag is not set, the user must click the 'Define Custom Color' button to display the custom color controls. |
|
0x4 |
CC_PREVENTFULLOPEN |
disables the 'Define Custom Colors' button on the color dialog box. |
|
0x80 |
CC_SOLIDCOLOR |
causes the dialog box to display only solid colors in the set of basic colors. |
|
0x100 |
CC_ANYCOLOR |
causes the dialog box to display all available colors in the set of basic colors. |
When the OK button control exits the color dialog, the COLOR object is set to the selected color. Otherwise, the COLOR object color value is not changed.
For improved performance in the Application Server environment, do not specify the optional return value unless needed.
This method is not supported when using the PL/B Web Server.
See Also: COLOR, COLOR Methods, Method Syntax
![]() |