|
|
Visits:
2584
(20 on line)
|
Last Update: Dec 24, 2003
|
|
|
|
| | |
| Description Inheritance Example Properties Methods |
| |
| Description |
The TChooseColor5 object is an object implementation of the ChooseColor standard Windows dialog. |
| Description Inheritance Example Properties Methods |
| |
| Inheritance |
Inherits from: TObject5 |
| Description Inheritance Example Properties Methods |
| |
| Example |
| |
 |
| |
The above form is generated by the following APL+Win Objects code: |
'ff'Œwi'*Create' 'TForm5'
'cc'Œwi'*Create' 'TChooseColor5'('flags'2)('colors'255(255 0 0)(0 255 0)(0 0 255))('parent' 'ff')
(3½256)‚†'cc'Œwi'ShowDialog' © must be called on a separate line (returns empty matrix if closed by Esc)
'gg'Œwi'*Create' 'TForm5'('*size'400 500)'DemoShow' 'SessionFocus'
gg
'cc'Œwi'*Create' 'TChooseColor5'('parent' 'gg')
(3½256)‚†'cc'Œwi'ShowDialog' © must be called on a separate line (returns empty matrix if closed by Esc)
|
| |
| Description Inheritance Example Properties Methods |
| |
| Properties |
| |
|
| class |
Description: Return current object class
Syntax: class„'obj' Œwi 'class' |
| colors |
Description: Get or set a 1 to 17-element color vector
Syntax: 'obj' Œwi 'colors'colors
colors: a color scalar or up to 17-element color vector
colors[1] „… Optional Initial Color.
colors[2..17] „… Optional Custom color definitions
Each element of colors maybe a 256ƒR G B scalar or a (R G B) numeric vector
Example:
'cc' Œwi 'colors'255(255 0 0) (0 255 0) (0 0 255) |
| flags |
Description: Get or set flags. Scalar. Sum of one or more of the following:
Syntax: 'obj' Œwi 'flags'flags
flags: optional flags (1 if not specified)
1: CC_RGBINIT - Use rgbResult as the initial color selection
2: CC_FULLOPEN - Display custom color definition section.
4: CC_PREVENTFULLOPEN - Disallow custom color definitions.
Example:
'cc' Œwi 'flags'2 4 |
| help |
Example:
0 0½'ff' Œwi '*Create' 'TForm5'
0 0½'cc' Œwi '*Create' 'TChooseColor5' ('flags'2) ('colors'255(255 0 0) (0 255 0) (0 0 255)) ('parent' 'ff')
(3½256)‚†Œ„'cc' Œwi 'ShowDialog' © must be called on a separate line (returns empty matrix if closed by Esc)
'gg' Œwi '*Create' 'TForm5' ('*size'400 500) 'DemoShow' 'SessionFocus'
0 0½'cc' Œwi '*Create' 'TChooseColor5' ('parent' 'gg')
(3½256)‚†Œ„'cc' Œwi 'ShowDialog' © must be called on a separate line (returns empty matrix if closed by Esc) |
| parent |
Description: Get or set the parent of the Choose Color dialog
Syntax: 'obj' Œwi 'parent'parent
parent: a Windows object name or handle
Example:
'ff' Œwi '*Create' 'TForm5'
'cc' Œwi 'parent' 'ff' |
|
| Description Inheritance Example Properties Methods |
| |
| Methods |
| |
|
| New |
Description: Create a new instance of TChooseColor5
Example:
'obj' Œwi '*Create' 'TChooseColor5'
|
| Wait |
Description: Call the Windows Choose Color common dialog
Syntax: result„'obj' Œwi 'ShowDialog'
result: one or 17 color elements encoded by 256
or scalar error code
Note: should not be called on the object creation instruction
Returns 0 if you press Esc, or close the form with Cancel button
(also returns 0 if you have selected Black!)
Example:
'cc' Œwi 'ShowDialog' |
|
| Description Inheritance Example Properties Methods |
| |
|