PPhraseDroplist

(Dialog Library)

Description:

Handles the complexity of parameter expressions by switching between display of a PhraseDroplist and regular Droplist control as is done in PPhraseEdit.

Returns: Nothing
Usage: Steady State only.
Function Groups: Graphics
Related to: GUITransform | PAddressEntry | PAlmPriority | PAreaSelect | PCheckBox | PColorEdit | PColorSelect | PContributor | PDroplist | PEditField | PEditName | PHSliderBar | PHueSelect | PImageSelect | PIPAddressList | PIPListenerGroup | PMultiCheckBox | PPageSelect | PRadioButtons | PSecBit | PSelectObject | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms
Format: \DialogLibrary.PPhraseDroplist(ParmNum,Title, PhraseIDArr, CanEdit, Index, FocusID[, Trigger, DrawBevel, VertAlign, SortPhrases])
Parameters:  
ParmNum
Required. Any numeric expression giving the parameter number (from 0) in the caller to alter.
Title
An optional parameter that is any text expression to be used as a title for the droplist.
PhraseIDArr
An array containing Phrase IDs (keys) for the list.
CanEdit
Boolean. If TRUE, users can edit within the field, adding new phrases.
Index
Numeric. The index variable to update within the array.
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).
Trigger
Optional. Trigger provides feedback. While editing, the value will be 0. When editing is complete (tab, enter or loss of focus) the value will change to non-zero: 1 if enter is pressed, 2 otherwise.
DrawBevel
Optional Boolean expression that when set to TRUE, causes a bevel to be drawn around the control. Defaults to TRUE. If the editfield is beveled, its size will become fixed and will be the same as that for a droplist.
VertAlign
An optional parameter that is any numeric expression that sets the vertical alignment of the editfield according to one of the following options:

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. The default value is 0.

AlignTitle
Optional Boolean. If AlignTitle is TRUE (non-0), the title will be included in the calculation for vertical alignment. If AlignTitle is FALSE (0), the title will be added to the editfield after both the editfield and its bevel have been vertically aligned. The default is true.
SortPhrases
Optional Boolean. If present and TRUE, the entries in the list will be sorted by the translated phrase.
Comments:

Droplist used to select a PhraseID by presenting the user with a droplist full of translated phrases. If CanEdit is TRUE then it is possible for the user to input new labels, in which case they will be added to the list and will be added to the language manifest.

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 (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.

Examples:

   { Equipment Type }
  GUITransform(0, 1, 1, 0,
               1 - 30,
               CtrlTop + 5*Space + 3*TEditHt + 3*TDropHt,
               Width - 30,
               1 - (CtrlTop + 5*Space + 3*TEditHt + 2*TDropHt), 1,
               0, 0, 1, 0,
               0, 0, 0,
               \DialogLibrary.PPhraseDroplist(\#EquipmentType, GetPhrase("EquipmentTypeLabel"),
                                              EquipmentTypesList, TRUE, EquipmentIdx, 1 {FID},
                                              Trigger, FALSE, 0, TRUE, TRUE));