PColorSelect

(Dialog Library)

Description:

Draws a button that opens a color selection dialog and an area that displays the currently selected color.

Returns: Nothing
Usage: Steady State only.
Function Groups: Color,  Graphics
Related to: GUITransform | PAddressEntry | PAlmPriority | PAreaSelect | PCheckBox | PColorEdit | PContributor | PDroplist | PEditField | PEditName | PFileChooser | PHSliderBar | PHueSelect | PImageSelect | PIPAddressList | PIPListenerGroup | PMultiCheckBox | PPageSelect | PPhraseEdit | PRadioButtons | PSecBit | PSelectObject | PServerListName | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms
Format: \DialogLibrary.PColorSelect(ParmNum [, BtnLabel, BtnOnLeft, Standard, VertAlign, FocusID, Open])
Parameters:  
ParmNum
Required. Any numeric expression giving the parameter number (from 0) in the caller to alter.
BtnLabel
An optional parameter that is any text expression to be used as a label on the color selection button.
BtnOnLeft
An optional parameter that is 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
An optional parameter that is 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
An optional parameter that is any numeric expression that sets the vertical alignment of the button and display area according to one of the following options:

VertAlign

Vertical Alignment

0

Top

1

Center

2

Bottom

Note: If Standard is true, this parameter is ignored. The default value is 0, top alignment.

FocusID

Optional.

Boolean. If this value is FALSE (0), the field will display its current setting, but cannot be opened (i.e. its value cannot be changed), and will appear disabled (grayed-out).
Open

An optional parameter that is any logical expression. If TRUE (non-0) the dialog will be forced open. If FALSE (0), it will be forced closed. The default is TRUE.

If provided as a variable, it will be set TRUE when the window is open and FALSE otherwise.

Comments:


This module is a member of the VTScada Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary\.
The "P" tools (Pcheck box, PContributor, PColorSelect, PDroplist, and PEditField) were intended only for use in configuration folders and drawing panel modules, and therefore are subject to the system security restraints.

This parameter tool expects the first parameter of its calling module to contain an array of tag parameters. It will then set the element indicated by ParmNum to the chosen color index.
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 calling transform, 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 transform. After the maximum display area size has been reached, the button and area will be fully justified to cover the entire width of the transform (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.

Usual height: 21 pixels.

Example:

GUITransform(70, 200, 290, 170,
             1, 1, 1, 1, 1,
             0, 0, 1, 0,
             0, 0, 0,
             \DialogLibrary.PColorSelect(8                 { Parm num            },
                                         \GetPhrase("Your_Custom_Label") { Label },
                                         TRUE              { Button on left      },
                                         TRUE              { Standard size       },
                                         1                 { Centered vertically },
                                         TRUE              { Focus ID            }));