
BBjColorChooser
Creation Path
|
+--BBjSysGui
|
+--BBjWindow
|
+--BBjColorChooser
Description
In BBj 7.0 and higher, the BBjColorChooser object provides methods for manipulating a GUI color chooser control and an interface to allow users to select colors, for example, in a preferences dialog.
Implemented Interfaces
DropTarget, Focusable, TabTraversable
Creation
A BBjColorChooser object is created through the following BBjWindow methods:
Return Value |
Method |
---|---|
BBjColorChooser |
addColorChooser(int ID, int x, int y, int width, int height) |
BBjColorChooser |
addColorChooser (int ID, int x, int y, int width, int height, BBjColor selected) |
BBjColorChooser |
addColorChooser (int ID, int x, int y, int width, int height, BBjColor selected, string flags) |
BBjColorChooser |
addColorChooser(int ID) |
BBjColorChooser |
addColorChooser(int ID, BBjColor selected!) |
BBjColorChooser |
addColorChooser(int ID, BBjColor selected!, String flags) |
BBjColorChooser |
addColorChooser() |
BBjColorChooser |
addColorChooser(BBjColor selected!) |
BBjColorChooser |
addColorChooser(BBjColor selected!, String flags) |
Methods of BBjColorChooser
Return Value |
Method |
void |
|
void |
|
string |
|
string |
|
getColor() |
|
boolean |
|
boolean |
|
void |
setApproveButtonText(string text) |
void |
setCancelButtonText(string text) |
void |
setColor(BBjColor color) |
void |
setControlButtonsAreShown(boolean shown) |
void |
setPreviewPanelVisible(boolean visible) |
Methods of BBjColorChooser implemented for DropTarget
Return Value |
Method |
int |
|
void |
setDropActions(int actions) |
void |
setDropTypes(BBjVector types) |
Methods of BBjColorChooser implemented for Focusable
Return Value |
Method |
boolean |
|
void |
setFocusable(boolean p_focus) |
Methods of BBjColorChooser implemented for TabTraversable
Return Value |
Method |
boolean |
|
void |
setTabTraversable(boolean trav) |
Methods of BBjColorChooser inherited from BBjControl
Events
Callback Code |
Object-oriented Event |
Read Record Event |
Code |
ON_COLORCHOOSER_APPROVE |
x |
||
ON_COLORCHOOSER_CANCEL |
x |
||
ON_COLORCHOOSER_CHANGE |
x |
||
ON_DROP_TARGET_DROP |
D |
||
ON_GAINED_FOCUS |
f |
||
ON_LOST_FOCUS |
f |
||
ON_MOUSE_ENTER |
E |
||
ON_MOUSE_EXIT |
E |
||
ON_POPUP_REQUEST |
r |
||
ON_RIGHT_MOUSE_DOWN |
R |
CSS
The visual appearance of BUI controls is defined using CSS (cascading style sheets) rules. Easily change the default colors, border, and other settings by customizing these rules, all without changing any application code. See CSS API for a high-level overview of BUI CSS.
For a BBjColorChooser sample program, refer to (demo, code). The BBjColorChooser defines the following style names:
.BBjChooser
.BBjColorChooser
.BBjColorChooser.bbj-disabled
.BBjColorChooser.bbj-focused
.BBjColorChooser-preview
.BBjColorChooser-hueRadioButton
.BBjColorChooser-hueValue
.BBjColorChooser-hueDegreeLabel
.BBjColorChooser-saturationRadioButton
.BBjColorChooser-saturationValue
.BBjColorChooser-saturationPercentLabel
.BBjColorChooser-brightnessRadioButton
.BBjColorChooser-brightnessValue
.BBjColorChooser-brightnessPercentLabel
.BBjColorChooser-redRadioButton
.BBjColorChooser-redValue
.BBjColorChooser-greenRadioButton
.BBjColorChooser-greenValue
.BBjColorChooser-blueRadioButton
.BBjColorChooser-blueValue
.BBjColorChooser-colorLabel
.BBjColorChooser-colorValue
.BBjChooser-button-panel
.BBjChooser-button
.BBjChooser-approveButton
.BBjChooser-cancelButton
Remarks
The BBjColorChooser is a complex control provided as-is from a GUI control library. As such, the installed LookAndFeel determines much of its presentation and behavior, attempting to adhere to the platform expectations as much as possible.
Constants inherited from BBjControl
Example
|
See Also
CALLBACK Verb - Register BBj Subroutine
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.