PAreaSelect

(Dialog Library)

Description:

Draws a droplist of area options with optional title and bevel.

Returns: Nothing
Usage: Steady State only.
Function Groups: Graphics
Related to: GUITransform | PAddressEntry | PAlmPriority | PCheckBox | PColorEdit | PColorSelect | PContributor | PDroplist | PEditField | PEditName | PFileChooser | PHSliderBar | PHueSelect | PImageSelect | PIPAddressList | PIPListenerGroup | PMultiCheckBox | PPageSelect | PPhraseEdit | PRadioButtons | PSecBit | PSelectObject | PServerListName | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms
Format: \DialogLibrary.PAreaSelect( CanEdit, FocusID, Init, DrawBevel, VertAlign, AlignTitle, ParmNum, ExtTrigger, OKPressed[, Title])
Parameters:  
CanEdit
Any logical expression. If true (non-0) the text displayed in the area droplist can be edited in the same manner as an editfield, if false (0) it cannot be edited directly. Defaults to true (1) if invalid.
FocusID
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).
Init
Any numeric expression indicating the initial value. No default is provided.
DrawBevel
Any logical expression. If true (non-0) a bevel is drawn around the area droplist, if false (0) no bevel is drawn. Defaults to true (1) if invalid.
VertAlign
Any numeric expression that sets the vertical alignment of the unopened area droplist according to one of the following:

VertAlign

Vertical Alignment

0

Top

1

Center

2

Bottom

Whether the title is included when the vertical alignment is calculated, is determined by the value of AlignTitle. Defaults to 0 if invalid.

AlignTitle
Any logical expression. If true (non-0) the title is included in the calculation for vertical alignment. If false(0) it is added to the area droplist after it (and its bevel if one exists) has been vertically aligned. Defaults to true (1) if invalid.
ParmNum
A parameter number (starting from 0), that will be edited instead of the default Area parameter. Specify the parameter to which you wish to add an area.
ExtTrigger
An external trigger, to be set when the area changes. Output value only.
OKPressed
Required. Linked to the OK button on the Config folder.
Title
An optional parameter that defaults to "Area"
Comments

This module is a member of the VTScada Dialog Library and must therefore be called from within a GUITransform and prefaced by \DialogLibrary..
This parameter tool expects the first parameter of its calling module to contain an array of tag parameters. It will then set the second element (element 1) to the text string that designates the selected area.
The height of the (unopened) area droplist is constant, with the horizontal boundaries of its calling transform defining its width, and the vertical boundaries of its calling transform defining its opened height, which will include the added height of a bevel, but may or may not include the title, depending on the alignment used. Note that if the entire list can be displayed in a smaller area than indicated by the vertical boundaries of the calling transform, the dropped list height will be decreased. The dropped height of the list will always have a minimum height of 1 line (below the field).

Usual height: 100 pixels.

Example 1

*PtrWaitClose = PickValid(SubWaitClose, 0);

GUITransform(10, 120, 110, 20,
             1, 1, 1, 1, 1 { No scaling },
             0, 0, 1, 0 { No movement; visible; reserved },
             0, 0, 0 { Not selectable },
              \DialogLibrary\PAreaSelect(TRUE      { Can Edit },
                                         2         { ID },
                                         Parms[1]  { Init },
                                         FALSE     { Bevel },
                                         0         { Top Align },
                                         1         { Align Title },
                                         13        { ParmNum },
                                         Trigger   { ExtTrigger },
                                         OKPressed { OKPressed }));

Example 2

GUITransform(30, 180, 210, 80,
             1, 1, 1, 1, 1 { No scaling },
             0, 0, 1, 0 { No movement; visible; reserved },
             0, 0, 0 { Not selectable },
              \DialogLibrary\PAreaSelect(FALSE     { Not Editable },
                                         2         { ID },
                                         Parms[1]  { Init },
                                         TRUE      { Bevel Drawn},
                                         1         { Center Align },
                                         1         { Align Title },
                                         1         { ParmNum },
                                         Trigger   { ExtTrigger },
                                         OKPressed { OKPressed },
                                         "Title Area"{ Title }));