/ HALion Developer Resource / HALion Macro Page / Templates /

Path Browser


On this page:


Path

Description

The PathBrowser is a preconfigured template that can be used to open folders and objects, such as sample files, for example. The template can be configured with the available Template Parameters. The look of the controls can be adapted freely by changing the components inside the template. The template also accepts the drop of folders or files from sources like the Explorer or Finder. When clicking the open icon, the OS file browser opens that lets you choose the folder and file. By Clicking OK this file path is set for the parameter that is connected to the Value parameter of the template.

To explore the functionality and connections:

  1. Load the Init Basic Controls.vstpreset from the Basic Controls library.
  2. Open the Macro Page Designer, go to the GUI Tree and navigate to "Pages > Path & Preset Page".
  3. Select "Sample Path - PathBrowser" and click Edit Element Edit Element to examine the template.

Template Properties

PopertyDescription
NameThe name of the element. This name will be displayed in the GUI Tree.
Position/SizePosition X, Position Y, Width, Height: Position and size of the element in pixels. Position X/Y defines the position of the upper left corner.
AttachDefines how an element behaves when its parent element is resized. You can set the following parameters:
  • Left: If the parent element is resized, the element remains attached to left edge, with the specified ratio.
  • Right: If the parent element is resized, the element moves relatively to the right edge, with the specified ratio.
  • Top: If the parent element is resized, the element remains attached to top edge, with the specified ratio.
  • Bottom: If the parent element is resized, the element moves relatively to the bottom edge, with the specified ratio.
  • Left + Right: If the parent element is resized, the element is resized horizontally relatively to the left and right edges, with the specified ratio.
TooltipText that appears as a tooltip when the mouse hovers over the element.
TemplateDetermines the template to be referenced.

Template Parameters

ParametersDescription
ValueAllows you to connect the parameter that requires a path and file name.
TypenameAllows you to specify the name of the file type filter that will be shown in the OS file browser.
ExtensionAllows you to specify a file type filter like .wav or .aiff, so that the OS file browser only shows files of that type.
TitleAllows you to specify the title of the OS file browser that will be shown in the caption.
TagAllows you to specify a unique identifier that is used to memorize the location at which you left the OS file browser the last time. All path browsers that use this tag will point to the same last location.

Components inside the Template

PathBrowser Template

Controls and Subtemplates

ItemDescription
switchA Switch that opens the OS file browser. Its Value must be set to @Browser.
dropviewA Drop control for dropping files and folders. Its Value must be set to @Path. The regular expression for the Accept Filter uses the file extension that is specified by the Extension parameter of the template.
textA Text control for displaying the path. Its Value must be set to @Path.
BackAn Image control that provides the background bitmap for the path.