VLPropertyList Reference

Editor Parameters

See Also See Also Applies To Applies To

Following table lists the parameters supported by various internal editors.

Param String Used by Description
True vlBooleanEditor This parameter is used to specify text for the True in the vlBooleanEditor.
False vlBooleanEditor This parameter is used to specify text for the False in the vlBooleanEditor.
DateFormat vlDateEditor A string specifying the date format to be used for displaying date in the editor.
Filter vlFileEditor A string specifying the file filter to be used for the file selection dialog. A filter specifies the type of files that are displayed in the dialog box's file list box. For example, selecting the filter *.txt displays all text files.

Use this property to provide the user with a list of filters that can be selected when the dialog box is displayed.

Use the pipe ( | ) symbol (ASCII 124) to separate the description and filter values. Don't include spaces before or after the pipe symbol, because these spaces will be displayed with the description and filter values.

The following code shows an example of a filter that enables the user to select text files or graphic files that include bitmaps and icons:

Text (*.txt)|*.txt|Pictures (*.bmp;*.ico)|*.bmp;*.ico

When you specify more than one filter for a dialog box, use the FilterIndex property to determine which filter is displayed as the default.

DialogCaption vlFileEditor,
vlDirectoryEditor
Use this parameter to specify the name of the dialog box to be displayed in the title bar.

The default title for an Open dialog box is Open

InitialDir vlFileEditor This parameter is used to specify the initial directory for Open dialog. If this property isn't specified, the current directory is used.
DefaultExt vlFileEditor This parameter is used to specify the default filename extension for the dialog box. When a file name with no extension is typed by the user, ths exxtension is automatically appended by the editor (Also see FileFlags parameter documentation),
FileFlags vlFileEditor This parameter specifies the options for file selection dialog.

Constant Value Description
vlffAllowMultiselect &H200 Specifies that the File Name list box allows multiple selections.

The user can select more than one file at run time by pressing the SHIFT key and using the UP ARROW and DOWN ARROW keys to select the desired files. When this is done, the editor value returns a string containing the names of all selected files. The names in the string are delimited by spaces.

vlffCreatePrompt &H2000 Specifies that the dialog box prompts the user to create a file that doesn't currently exist. This flag automatically sets the vlffPathMustExist and vlffFileMustExist flags.
vlffExplorer &H80000 Use the Explorer-like Open A File dialog box template. Works with Windows 95, Windows NT 4.0, or later versions.
vlffExtensionDifferent &H400 Indicates that the extension of the returned filename is different from the extension specified by the DefaultExt property. This flag isn't set if the DefaultExt property is Null, if the extensions match, or if the file has no extension. This flag value can be checked upon closing the dialog box.
vlffFileMustExist &H1000 Specifies that the user can enter only names of existing files in the File Name text box. If this flag is set and the user enters an invalid filename, a warning is displayed. This flag automatically sets the vlffPathMustExist flag.
vlffHelpButton &H10 Causes the dialog box to display the Help button.
vlffHideReadOnly &H4 Hides the Read Only check box.
vlffLongNames &H200000 Use long filenames.
vlffNoChangeDir &H8 Forces the dialog box to set the current directory to what it was when the dialog box was opened.
vlffNoDereferenceLinks &H100000 Do not dereference shell links (also known as shortcuts). By default, choosing a shell link causes it to be dereferenced by the shell.
vlffNoLongNames &H40000 No long file names.
vlffNoReadOnlyReturn &H8000 Specifies that the returned file won't have the Read Only attribute set and won't be in a write-protected directory.
vlffNoValidate &H100 Specifies that the common dialog box allows invalid characters in the returned filename.
vlffPathMustExist &H800 Specifies that the user can enter only valid paths. If this flag is set and the user enters an invalid path, a warning message is displayed.
vlffReadOnly &H1 Causes the Read Only check box to be initially checked when the dialog box is created. This flag also indicates the state of the Read Only check box when the dialog box is closed.
vlffShareAware &H4000 Specifies that sharing violation errors will be ignored.

AllowFloatingPoint vlNumberEditor This parameter is used to specify if the editor should allow a floating point number entry. Specify TRUE or a non-zero numeric value for this parameter to allow entry of '.' for this property. By default, number editor will not accept floating point numbers.

Only one '.' (decimal) will be allowed in the number.

AllowNegative vlNumberEditor This parameter is used to specify if the editor should allow a negative number entry. Specify TRUE or a non-zero numeric value for this parameter to allow entry of '-' for this property. By default, number editor will not accept negative numbers.

The '-' (minus) sign will be allowed only in the first character position.

PaletteTabCaption vlColorEditor This parameter is used to specify caption that appears on the color palette tab in color picker drop-down.
SystemTabCaption vlColorEditor This parameter is used to specify caption that appears on the system color tab in color picker drop-down.
Setting system color names vlColorEditor For setting system color names on system color tab, you will need to use the vlSysColorNames enum values as param name.

For example, for specifying a new text in place "Scroll bars" text that appears in the system color tab, following piece of code can be used :

With VLPropList1
      Call.SetEditorParam VLColorEditor, vlSysColorNames.vlScrollBars, "Scrollbar Color"
End WIth


   

This mechanism can also be used for storing parameters for custom editor. It is the responsibility of the editor author to read the appropriate param value from the property and assume appropriate default value when param is not specified.