PColorSelect 

                        (VTS Library)

Description:              This module draws a button that opens a color selection dialog and an area that displays the currently selected color.

Returns:                    Nothing

Usage:                       Steady State

Format:                      \DialogLibrary\PColorSelect(ParmNum [, BtnLabel, BtnOnLeft, Standard, VertAlign, FocusID, Open])

Parameters:             ParmNum    { numeric }  { required }  { no default }

                                      Any numeric expression giving the parameter number (from 0) in the caller to alter.

                                    BtnLabel    { text }  { optional }  { no default }

                                      An optional parameter that is any text expression to be used as a label on the color selection button.

                                    BtnOnLeft    { Boolean }  { optional }  { default: TRUE }

                                      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    { Boolean }  { optional }  { default: TRUE }

                                      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    { numeric }  { optional }  { default: 0 }

                                      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    { numeric }  { optional }  { default:  see note }

                                      An optional parameter that is any numeric expression for the focus number of the button. If this value is 0, the current value of Color will still be displayed, but it will not be able to be set because the button will appear grayed out.

                             If this parameter is omitted or invalid, the next available focus ID will be assigned.

                                    Open    { Boolean }  { optional }  { default: TRUE }

                                      An optional parameter that is any logical expression; if true (non-0) the dialog will be open; if false (0), it will be closed. The default is true.

Comments:               This module is a member of the VTS Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary\.

                             The "P" tools (PCheckbox, 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. Once 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.

Example:

GUITransform(70, 200, 290, 170,

             1, 1, 1, 1, 1, 

             0, 0, 1, 0, 

             0, 0, 0, 

             \DialogLibrary\PColorSelect(8 { Parm num }, 

             "Set Color" { Label }, 

             1 { Button on left },

             1 { Standard size }, 

             1 { Centered vertically }, 

             4 { Focus ID })); 

See Also:

PAreaSelect | PCheckbox | PContributor | PDroplist | PEditfield | PPageSelect | PRadioButtons | PSecBit | PSelectObject | PSpinbox | PTypeToggle