fmShowFileBrowser

Purpose:

Display the contents of a local or remote connection in a Windows Explorer style File Browser. Use an existing VisualNEO Win Rectangle object to serve as host for the browser. You can customize the appearance of the browser using fmSetFileBrowserProperties.

Category:

File Browser

Syntax:

fmShowFileBrowser "connection id" "rectangle"

connection id

The name assigned to the connection you want to display in the File Browser. The connection must have already been opened with fmConnectLocal or fmConnectRemote.

rectangle

The name of an existing VisualNEO Win Rectangle object. The Rectangle will serve as a host for the File Browser. Use VisualNEO Win's Tool Palette to create a Rectangle object on the page in your publication where you want the browser to appear. After executing fmShowFileBrowser, the File Browser will appear within the boundaries of the Rectangle object. The File Browser is only visible when the publication is running.


Rectangle object before fmShowFileBrowser

Rectangle object after fmShowFileBrowser


Example:

fmShowFileBrowser "Local1" "Rectangle1"


fmHideFileBrowser

Purpose:

Hide a File Browser previously displayed with the fmShowFileBrowser action. Calling fmHideFileBrowser is optional since any File Browsers that are visible when a publication shuts down will be hidden and their connections closed automatically.

Category:

File Browser

Syntax:

fmHideFileBrowser "connection id"

connection id

The name assigned to the connection that owns the File Browser you want to hide.

Example:

fmHideFileBrowser "Local1"


fmSetFileBrowserProperties

Purpose:

Customize the visual appearance and behavior of a File Browser.

Category:

File Browser

Syntax:

fmSetFileBrowserProperties "connection id" "properties"

connection id

The name assigned to the connection that owns the File Browser you want to modify.

properties

This is a compound parameter and can contain any combination of the following items:


MultiSelect=yes/no

Yes = allow the user to select multiple items at the same time. No = user can only select one item at a time.

RowSelect=yes/no

Yes = the entire row will be highlighted when an item is selected. No = only the item's name will be highlighted.


Note: This property only affects the "Details" view style.

AllowDrag=yes/no

Yes = user can drag selected items from this File Browser to other File Browsers and Windows applications. No = user cannot drag files from this File Browser.

AllowDrop=value

This option controls how the File Browser responds to dropped files. Value can be one of the following:


None

Browser will not accept dropped files at all.

Internal

Browser will accept dropped files from other FM/FTP browsers only.

External

Browser will accept dropped files from external applications only.

All

Browser will accept dropped files from any source.


DragMethod=value

Use this option to control the appearance of the drag image. Value may be one of the following:


Icon

Drag image contains icon of dragged file.

Thumbnail

Drag image contains Windows generated thumbnail of dragged file.

Auto

Drag image is determined by the ViewStyle property. If ViewStyle = Thumbnails, then drag image contains Windows generated thumbnail. Otherwise, drag image contains icon of dragged file.


AllowRename=yes/no

Yes = user may rename files and folders by clicking on an item's name.

ViewStyle=value

The format used to display files in the list view. Value can be one of the following:


ExtraLargeIcons

Display items with extra large icons - usually 48x48 pixels.

LargeIcons

Display items with large (32x32) icons.

SmallIcons

Display items with small (16x16) icons.

List

Display items in list form with small icons.


Note: The List and SmallIcons modes are the same except that SmallIcons will display items in multiple columns if there is room.

Details

Display the item name, type, size, date, attributes and small (16x16) icon in a report format. Use in conjunction with the ShowHeader property below.

Tiles

Display the item name, type, size and large (32x32) icon.

Thumbnails

Display item name and a Windows-generated thumbnail. The size of the thumbnail can be customized using the ThumbnailHeight property below.


Note: The icons and thumbnails for each item are generated by Windows. Thumbnails are not provided for all file formats. When thumbnails are not available, Windows usually substitutes the file's associated extra large icon. Thumbnails and extra large icons are only available for local files in Windows XP and higher. For older versions of Windows, or when viewing remote FTP sites, large icons will be substituted.

ViewContents=value

The type of content that you want to appear in the list view. Value can be one of the following:


All

Display both files and folders.

FilesOnly

Display only files.

FoldersOnly

Display only folders.


Note: This property has no effect on the tree view. If you want to prevent access to folders altogether, then you should also use the ShowTree property below to hide the tree view.

ShowExtensions=yes/no

Yes = display file name with extensions in the list view. No = display file names without extensions.

ShowHiddenFiles=yes/no

Yes = include files and folders marked as "hidden" in the list view. No = do not display hidden files and folders. (This only affects local connections.)

ShowCheckBoxes=yes/no

Yes = display check boxes next to each item in the list view. No = do not display check boxes. When visible, check boxes provide additional feedback to the user indicating which items are selected.


ThumbnailHeight=number

The height in pixels of the thumbnails displayed when the ViewStyle is set to "thumbnails". The height should be between 16 and 512. (Thumbnails are only available for local connections in Windows XP and higher.)

ShowFiles=yes/no

Yes = display the browser's file list view. No = do not display the file list view.

ShowTree=yes/no

Yes = display the browser's tree view. No = do not display the tree view.

TreePosition=value

The location of the tree view pane. Value can be one of the following:


Top

Align tree view to the top of the browser. (This is the default.)

Bottom

Align tree view to the bottom of the browser.

Left

Align tree view on the left side of the browser.

Right

Align tree view on the right side of the browser.


BorderWidth=number

The size of the border surrounding the File Browser. For no border, set the border width to "0".

BorderColor=color

The color of the border surrounding the File Browser. See Defining Colors.

ListColor=color

The color used for the background of the browser's list view. See Defining Colors.

ListFont=font

The font name, size, style and character set of the font used for the list view. See Defining Fonts.

ListFontColor=color

The color used for the captions in the list view. See Defining Colors.

ListSelectionColor=

topcolor+bottomcolor

The color used to highlight selected items in the list view. This can be either a single color to create a solid fill or two colors to create a gradient fill. To create a gradient, separate the top and bottom colors with a plus (+) sign. See Defining Colors.

ListSelectionBorderColor=color

The color used to outline selected items in the list view. See Defining Colors.

ListSelectionFontColor=color

The color used for the captions of selected items in the list view. See Defining Colors.

ListInactiveColor=color

The color used to highlight selected items in the list view when the browser is not active. See Defining Colors.

ListInactiveFontColor=color

The color used for the captions of selected items in the  list view when the browser is not active. See Defining Colors.

TreeColor=color

The color used for the background of the browser's tree view. See Defining Colors.

TreeFont=font

The font name, size, style and character set of the font used for the tree view. See Defining Fonts.

TreeFontColor=color

The color used for the captions in the tree view. See Defining Colors.

TreeSelectionColor=

topcolor+bottomcolor

The color used to highlight the tree view's selected folder. This can be either a single color to create a solid fill or two colors to create a gradient fill. To create a gradient, separate the top and bottom colors with a plus (+) sign. See Defining Colors.

TreeSelectionBorderColor=color

The color used to outline the tree view's current folder. See Defining Colors.

TreeSelectionFontColor=color

The color used for the caption of the tree view's current folder. See Defining Colors.

TreeInactiveColor=color

The color used to highlight the current folder when the browser is not active. See Defining Colors.

TreeInactiveFontColor=color

The color used for the captions of the current folder when the browser is not active. See Defining Colors.

ShowHeader=yes/no

Yes = Display a header across the top of the list view.  No = do not display the header.


Note: The header makes most sense when used with the "details" ViewStyle, but can be used with other modes if you like. The header also allows users to sort files by clicking on the header's column titles.

ThemedHeader=yes/no

Yes = use the Windows theme to draw the header (Windows XP, Vista and Windows 7 only). No = use the defined color, font, etc. properties below to draw the header.


Note: When ThemedHeader=Yes the HeaderColor and HeaderFont properties are ignored.

HeaderColor=color

The color used for the background of the header. See Defining Colors. ThemedHeader must be set to "No" in order to use this property.

HeaderFont=font

The font name, size, style and character set of the font used for the header. See Defining Fonts.

HeaderFontColor=color

The color used for the header text. See Defining Colors.

SortArrowColor=color

The color used for the sort direction indicator that appears in the header. See Defining Colors.

SplitterPos=number

The position of the splitter that separates the  browser's tree view and list view panes. The splitter  position is actually the height (or width) in pixels of the tree view pane. At runtime, the user may drag the splitter to enlarge or reduce the amount of screen space consumed by the folder tree and file list. You can use fmGetFileBrowserProperties to retrieve the splitter position.

SplitterColor=color

The color used for the splitter that separates the tree view and list view panes. See Defining Colors.

ShowPathBar=yes/no

Yes = display the active path along the top of the browser. No = do not display the path.


Note: When using multiple File Browsers, the path bar also provides a handy indicator of which one is considered active. See PathBarColor and PathBarInactiveColor below.

PathBarColor=

topcolor+bottomcolor

The color used for the background of the path bar when the browser is active. This can be either a single color to create a solid fill or two colors to create a gradient fill. To create a gradient, separate the top and bottom colors with a plus (+) sign. See Defining Colors.

PathBarFont=font

The name, size, style and character set of the font used for the path bar caption. See Defining Fonts.

PathBarFontColor=color

The color used for the path bar caption when the browser is active. See Defining Colors.

PathBarInactiveColor=

topcolor+bottomcolor

The color used for the background of the path bar when the browser is not active. This can be either a single color to create a solid fill or two colors to create a gradient fill. To create a gradient, separate the top and bottom colors with a plus (+) sign. See Defining Colors.

PathBarInactiveFontColor=

color

The color used for the path bar caption when the browser is not active. See Defining Colors.

ShowStatusBar=yes/no

Yes = display a status bar along the bottom of the browser. No = do not display a status bar.


Note: The status bar includes the number of files selected and the total number of files displayed. You can use the fmTranslateStrings action to customize or translate the status bar's caption.

StatusBarColor=

topcolor+bottomcolor

The color used for the background of the status bar. This can be either a single color to create a solid fill or two colors to create a gradient fill. To create a gradient, separate the top and bottom colors with a plus (+) sign. See Defining Colors.

StatusBarFont=font

The name, size, style and character set of the font used for the status bar's caption. See Defining Fonts.

StatusBarFontColor=color

The color used for the status bar's caption. See Defining Colors.


Separate multiple items in a compound parameter with semicolons (;). Because of the large number of options, it is recommended that you use the wizard provided for the fmSetFileBrowserProperties Action.

Example:

fmSetFileBrowserProperties "Client1" "ViewStyle=Thumbnails;ShowHeader=No"

fmShowFileBrowser "Local1" "Rectangle1"


fmGetFileBrowserProperties

Purpose:

Retrieve information about a File Browser. The properties that can be retrieved are the same as those used by the fmSetFileBrowserProperties action.

Category:

File Browser

Syntax:

fmGetFileBrowserProperties "connection id" "properties" "variable"

connection id

The name assigned to the connection that owns the File Browser.

properties

One or more property keywords below. Separate multiple properties with semicolons (;). To  retrieve all properties at once, use the keyword "ALL".


MultiSelect

RowSelect

AllowDrag

AllowDrop

DragMethod

AllowRename

ViewStyle

ThumbnailHeight

ShowFiles

ShowTree

TreePosition

BorderWidth

BorderColor

ListColor

ListFont

ListFontColor

ListDetailFontColor

ListSelectionColor

ListSelectionBorderColor

ListSelectionFontColor

ListInactiveColor

ListInactiveFontColor

TreeColor

TreeFont

TreeFontColor

TreeSelectionColor

TreeSelectionBorderColor

TreeSelectionFontColor

TreeInactiveColor

TreeInactiveFontColor

ShowHeader

ThemedHeader

HeaderColor

HeaderFont

HeaderFontColor

SortArrowColor

SplitterPos

SplitterColor

ShowPathBar

PathBarColor

PathFont

PathBarFontColor

PathBarInactiveColor

PathBarInactiveFontColor

ShowStatusBar

StatusBarColor

StatusBarFont

StatusBarFontColor


See fmSetFileBrowserProperties for descriptions of the properties.

variable

The name of the variable where the retrieved property or properties will be stored. When a single property is requested, variable will contain the returned value only. When multiple properties are requested, variable will contain the both property name and the returned value separated by an equal sign (=). Each name=value pair will be separated by the current global delimiter. This is the same format used by the fmSetFileBrowserProperties action.

Example:

The following example retrieves the position of the browser's splitter that separates the folder tree and the file list:


fmGetFileBrowserProperties "Client1" "SplitterPos" "[Temp]"

AlertBox "Hello" "The splitter position is [Temp] pixels."


The following example retrieves the ViewStyle and ThumbnailHeight properties:


fmGetFileBrowserProperties "Client1" "ViewStyle;ThumbnailHeight" "[Temp]"


The following example retrieves all properties and saves them to a file called MyApp.inf:


fmGetFileBrowserProperties "Local1" "All" "[Temp]"

FileWrite "[PubDir]MyApp.inf" "All" "[Temp]"


fmFocus

Purpose:

Activate a specific File Browser. The browser must have previously been made visible with fmShowFileBrowser for this action to have any affect.

Category:

File Browser

Syntax:

fmFocus "connection id"

connection id

The name assigned to the connection that owns the File Browser you want to activate.

Example:

fmFocus "Local1"


fmSetHeaderColumnWidths

Purpose:

Set the width of each column in the File Browser's header. This action can be combined with fmGetHeaderColumnWidths to save and restore changes users make to the header.


Note: The header can be turned on or off with the fmSetFileBrowserProperties action. The column captions can be customized or translated with the fmTranslateStrings action.

Category:

File Browser

Syntax:

fmSetHeaderColumnWidths "connection id" "columns"

connection id

The name assigned to the connection that owns the File Browser.

columns

A list containing the column name, an equal sign and the width (in pixels) to be assigned to each column. Separated multiple items with a semicolon character (;). This is the same format returned by fmGetHeaderColumnWidths. Valid column names are:


Name

Date

DriveType

Size

Attributes

DriveSize

Type

DriveName

DriveFree


For example, setting the width of the Name, Size, Type, Date and Attributes columns would look like this:


"Name=150;Size=90;Type=125;Date=90;Attributes=75"


It is not necessary to include every column in the list. You can shorten the action by including only the column's that you want to change. column's not in the list will retain their existing widths. For example:


"Name=150;Size=90;Type=125"


The DriveName, DriveType, DriveSize and DriveFree columns only appear when the "My Computer" folder is displayed.

Example:

fmSetHeaderColumnWidths "Local1" "Name=150;Size=90;Type=125"


fmGetHeaderColumnWidths

Purpose:

Get the width of each column in the File Browser's header.


Note: The header can be turned on or off with the fmSetFileBrowserProperties action.

Category:

File Browser

Syntax:

fmGetHeaderColumnWidths "connection id" "variable"

connection id

The name assigned to the connection that owns the File Browser.

variable

The name of the variable where the column widths will be stored. The variable format will be identical to that used by the fmSetHeaderColumnWidths action.

Example:

fmGetHeaderColumnWidths "Local1" "[ColWidths]"


fmEnable

Purpose:

Enable a File Browser. When enabled, the browser can respond to mouse and keyboard events. Use in conjunction with fmDisable.

Category:

File Browser

Syntax:

fmEnable "connection id"

connection id

The name assigned to the connection that owns the File Browser you want to enable.

Example:

fmEnable "Local1"


fmDisable

Purpose:

Disable a File Browser. When disabled, the browser will ignore all mouse and keyboard events. Use in conjunction with fmEnable.

Category:

File Browser

Syntax:

fmDisable "connection id"

connection id

The name assigned to the connection that owns the File Browser you want to disable.

Example:

fmDisable "Local1"