PFileChooser
(Dialog Library)
Description: |
Parameter setting file selection. Provides an edit box for specifying a file name, along with a label and a browse button. |
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 | PPhraseEdit | PRadioButtons | PSecBit | PSelectObject | PServerListName | PSpinbox | PTimeZone | PTypeToggle | SiteDispParms|FileChooser |
Format: | \DialogLibrary.PFileChooser(ParmNum, Title, ButtonLabel, ID, Trigger, View, Save, FilterPattern, FilterDesc, DialogTitle, ExtensionToUse, [DrawBevel, VertAlign, AlignTitle]) |
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 field. Defaults to "" if invalid. | ||||||||||
ButtonLabel | ||||||||||
An optional parameter that is any text expression to be used as a label for the browse button. Defaults to "..." if invalid. | ||||||||||
ID | ||||||||||
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 | ||||||||||
Required. 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. | ||||||||||
View | ||||||||||
Required. Indicates how to display the editfield, as follows. The default value is 2 if FocusID is 0 and 1 otherwise.
This parameter may be used to force an editfield with a FocusID of 0 to display normally, rather than allowing it to default to its grayed color. |
||||||||||
Save | ||||||||||
|
||||||||||
FilterPattern | ||||||||||
Required text. An array or a semicolon-separated list of wildcard file patterns for the types that will appear. Defaults to "" if invalid. | ||||||||||
FilterDesc | ||||||||||
Required text. An array or a semicolon-separated list of text values describing the corresponding FilterPatterns. Defaults to "" if invalid. | ||||||||||
DialogTitle | ||||||||||
Required text. The title to apply to the file dialog. Defaults to "" if invalid. | ||||||||||
ExtensionToUse | ||||||||||
Required text. For save dialogs (Save parameter == 1) the file extension to use if not specified by the user. Defaults to "" if invalid. | ||||||||||
DrawBevel | ||||||||||
OptionalBoolean. If TRUE, the bevel is drawn | ||||||||||
VertAlign | ||||||||||
Optional. Any numeric expression that sets the vertical alignment of the edit field according to one of the following options
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. TRUE if title affects alignment |
Comments: |
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 value in the editfield. |
Example:
{ Custom Point Definition File } GUITransform(30, 45 + 4*Space + 2*TDropHt + 3*TEditHt, Width - 30, 45 + 4*Space + 2*TDropHt + 2*TEditHt, 1, 1, 1, 1, 1 { No scaling }, 0, 0, 1, 0 { No movement; visible; reserved }, 0, 0, 0 { Not selectable }, \DialogLibrary.PFileChooser(\#PointDefCSV, \GetPhrase("CustomPointDefLabel") {Title}, \GetPhrase("BrowseLabel") {BtnLabel}, 7 {FID}, Trigger, 2, 0 {Open}, "*.CSV" { filter }, GetPhrase("CSVFileLabel") { desc }, \GetPhrase("CustomPointDefLabel"), Invalid, FALSE));