Documentation component by D.Glodt (c)
2000-2001, & John Kelly |
QColorDialog |
|
QColorDialog Component
-
INCLUDED IN RAPIDQ2.INC
QColorDialog is a dialogue box used to select a color. See
limitations.
QColorDialog Properties
Field |
Type |
R/W |
Default |
|
|
|
|
Caption |
STRING |
RW |
|
Colors |
Array of LONG |
RW |
|
|
Define the value of 16 colors. |
Color |
LONG |
R |
|
|
Value color selected. |
Left |
LONG |
RW |
center |
Top |
LONG |
RW |
center |
|
Value color selected. |
Style |
INTEGER |
RW |
cdNormal |
|
Style dialog box, can be cdFullOpen or
cdNoFullOpen |
QColorDialog Methods
Method |
Type |
Description |
Params |
|
|
|
|
Execute |
FUNCTION |
Open the dialog box , return True if color selection |
|
QColorDialog Events
Event |
Type |
Occurs when... |
Params |
|
|
|
|
QColorDialog Examples
' Color chooser dialog example
$TYPECHECK ON
$INCLUDE "RAPIDQ2.INC"
DECLARE SUB ButtonClick (Sender AS QBUTTON)
dim Dial as QColorDialog
Dial.Style=cdNoFullOpen
Dial.left = 12
Dial.Top = 50
CREATE Form AS QFORM
Caption = "test colors"
CREATE Button AS QBUTTON
Width = 100
Caption = "Choose a color"
OnClick = ButtonClick
END CREATE
Center
END CREATE
form.ShowModal
SUB ButtonClick (Sender AS BUTTON)
Dial.Style = cdFullOpen
Dial.Caption = "select color"
if Dial.Execute then
Form.Color=Dial.Color
end if
END SUB