Each of TreeView Professional's parameters is explained below, with reference to the clickable example code in the left frame: you can click a parameter from the example code to jump to its explanation, or simply read this page from top to toe. As you read, click the red references to other parameters to jump to them.
Most of TreeView Pro's parameters have a default setting which is mentioned below. If the default setting is the option you'd like to use in your own implementation, you can leave that parameter out of your HTML code.
The 'Archive' attribute & 'CabBase' parameter
JAR (Java ARchive) and CAB (cabinet) files are archives containing Java class files in compressed form, making them easier to handle and quicker to download. (Java 1.1-compatible browsers are able to read JAR and/or CAB files, and TreeView Professional requires a Java 1.1-compatible browser, so we don't bother to provide separate class files with this applet.) The Archive attribute and CabBase parameter tell the browser the name of the archive file to open. The .JAR and .CAB files must be in the same directory, and the CODEBASE= attribute is used in the normal way, if required, specifying the absolute or relative location of this directory.
Applet Width & Height
Setting the applet's dimensions couldn't be easier: how much real estate can you afford? TreeView Professional adds and removes horizontal and vertical scrollbars whenever necessary to ensure that the entire menu can be reached regardless of applet size, so you can assign as much or as little space to the applet as you want to. That said, horizontal scrollbars are pretty irritating things: if possible, try to ensure that the applet width is sufficient to display most of your entries without scrolling.
Copyright
This parameter must be included or the applet will not run, whether registered or unregistered. To prevent mistakes we recommend that you copy/paste it into your code from the Getting Started page: it is case-sensitive, single-spaced throughout and should appear on a single line. If there's a problem with this parameter, you'll see a status-bar message that reads "Copyright parameter missing or incorrect" which should lead you to the problem.
Name
This optional parameter is used to specify a unique name for an instance of an applet on a site when the Spytracking feature is used, explained in greater detail in Using Spytracking. If you're not using Spytracking, you can ignore this parameter.
BgColor
The applet's background color as a hex triplet. You would usually set this to the same value as that of your page's body-background. The default is FFFFFF (white).
TextColor
The color used to display both the text labels of the menu entries and the outline structure of the tree. The default is FFFFFF (black).
FocusTextColor
The color of a text label when the mouse passes over it. The default is C00000.
SelectTextColor
The text color of the currently-selected tree item. The default is FFFFFF (white).
SelectorColor
The color of the selector-bar highlighting the currently-selected item. The default is 000080 (navy). The selector-bar is visible only when the applet is focussed. When unfocussed only its border remains visible.
SelectorBorderColor
The color of the selector-bar's border. This forms a border around the selector-bar when the applet is focussed and remains visible when focus moves elsewhere within the browser. The default for this parameter is to match your BgColor, effectively removing the border.
BorderColor
The color of the optional border surrounding the entire applet area. By default, this will also match your chosen BgColor.
ScrollBgColor
The background color of the scrollbars (when visible). If this parameter is missing, the scrollbar background color will take the system default.
ScrollFgColor
The foreground color of the scrollbars (when visible). If this parameter is missing, the scrollbar foreground color will take the system default.
OutlineColor
The color of the tree-outline structure. By default, this will match your chosen TextColor.
Font
A comma-delimited string giving the name, style and size of the font you want to use for all item labels. The default settings are Dialog, in plain, at size 12, which would be written as Dialog,plain,12. Two important things to note: first, there must be no spaces in this entry; second, the three items must appear in the order name,style,size. Note that the style part of this setting can be plain, bold, italic or bolditalic, and these are not case-sensitive.
It is possible for the entries to overlap if the font used is particularly large. This is rather academic, since a font of this size (roughly 24 points) would be pretty unpleasant to read.
UseHandCursor
A simple yes or no parameter with a default value of no. If set to 'yes', the mouse pointer will change to a hand when the mouse enters the tree. Set to 'no', it won't.
DefaultTarget
HTML offers it's own range of recognized targets for links: _top, _self, _blank and _parent. But when you use an applet like TreeView Professional that can take countless links, you'll often be opening your pages into a main frame in your browser, perhaps called 'Main', so almost every entry on the menu will need a Target parameter with the value "Main". The DefaultTarget parameter gives you a way to avoid entering all those identical parameters. Just enter the name of this main frame in the DefaultTarget parameter and it will be used by default for any item on your menu that doesn't have its own individual Target parameter to override it.
The default setting for this parameter is _self, so if you leave this parameter out, any link that doesn't have its own Target parameter will open its document in the frame containing the applet.
Mode
A choice of two non-case-sensitive values: plain or images. The default is plain. In 'plain' mode, the menu will be created using only text labels and the tree's outline-structure. In this mode, any settings you've included that relate to images will be ignored.
In 'images' mode, icons are added to each item on the menu, placed between the outline structure and the label. There are two ways to specify which images to use: the first is simply to add the SingleImage parameter specifying a set of default images to use; the other (which can be used in conjunction with the first) is to specify individual images for some or all items using the Item parameters.
SingleImage
This parameters takes effect only if Mode is set to images. This parameter specifies the name, and location if necessary, of an image file containing three images to be used as icons for every item in the tree. This image is created as follows:
The images in this file will be used for any item that doesn't specify its own images in its Item parameter. TreeView Professional automatically assigns correct image to folders and pages for you, provided that you've placed the three images into the singleimage in the correct order.
InitialSelect
When the applet first starts, you can opt to have an Item already selected, usually to indicate the page currently open in the main frame. Set this parameter to the number corresponding to the Item number that should be selected. If the selected item is a folder, it will be automatically expanded to reveal its contents. If the item is contained within another folder, the parent folder (and the parent's parent, etc) will be expanded to ensure that the selected item is visible.
A setting of 1 here will select the first item in the tree and expand it if it is a folder. A setting of 0 (the default) will select the first item but not expand it. For the selected item, only the selector border will be visible to indicate this it is selected: if your SelectorBorderColor matches your BgColor, the item will look no different to any other.
If you use Spytracking, it's simplest to leave this parameter out or set its value to 0. This way, the page that opens in the main frame will select the correct initial entry on the menu.
ExpandAll
A simple yes or no parameter, for which the default is 'no'. Values are not case-sensitive. If set to 'yes', every expandable branch of the tree will be expanded when the applet starts.
AutoCollapse
Although TreeView Professional automatically displays horizontal and/or vertical scrollbars to ensure that every item on the tree can be reached, scrollbars are not the most user-friendly of controls. This yes or no parameter makes vertical scrollbars less likely to be needed by collapsing any tree branches that don't need to be open every time an item is clicked or expanded.
The default value is No, for backward compatibility with previous TreeView Pro versions. To enable AutoCollapse, include this parameter with a value of "yes".
Sound
Specifies whether or not you'd like the applet to play sounds in response to mouse-clicks. The value can be either yes or no, and neither is case-sensitive. (The default value is no.) If you want to use sounds, note that you must direct the applet to at least one Sun/NeXT format (.au) audio file using any or all of the three following parameters. This parameter is included so that if you have several TreeView Pro applets running at once, you have the option to use sounds in one and not in another.
OpenSound
The path (if necessary) and name of the audio file to be played when an expandable item is clicked to expand it. See Using Sounds, below. Paths to audio files are specified as URLs and may be either absolute or relative to the location of the current HTML page.
CloseSound
The path (if necessary) and name of the audio file to be played when an expanded item is clicked to collapse it. See Using Sounds, below.
LinkSound
The path (if necessary) and name of the audio file to be played when a linking item is clicked. Note that if a folder is expandable and also acts as a link, this sound will be overridden by either the CloseSound or the OpenSound (depending upon whether the folder is currently expanded or not). See Using Sounds, below.
Using Sounds: TreeView Professional is very forgiving in its sound support. If Sound is set to 'yes' but none of the three parameters above is included (or you forgot to upload the audio files!) TreeView Pro will still work properly, albeit silently. Therefore, if you only wish to have audio accompaniment for links (for example), simply remove the OpenSound/CloseSound parameters.
Item1, Item2, . . . Itemn
We've included step-by-step details about the Item parameters in Getting Started so we won't repeat them all here. The essential points to remember are:
The other aspect of the Item parameters is that they allow you to specify images to be used as icons beside the label. If you don't specify individual images for an item, the images contained in the SingleImage will be used by default.
Every item can take 2 images: a 'closed' and an 'open' image. The Item1 parameter in the code opposite demonstrates this: after the label, add a pipe symbol (|) followed by the name (and location if necessary) of the 'closed' image, then a second pipe symbol and the path to the 'open' image.
In the case of folders, you probably want to use 2 images to illustrate the expanded and collapsed states. You might wish to use 2 images for pages as well, so that a different image appears when a page is clicked to open its link. But more usually you would want the page image to remain unchanged. One way to do this is to specify the same image in both slots. But there's no need to do that: if no 'open' image is specified, the applet automatically uses the 'closed' image for both. In the code to the left, Item2 has just one image included, so TreeView Pro will always display that image beside that item whether it's been clicked or not.
Note that the applet does not scale the images or modify them in any way. For best results, try to use images that are roughly equal in dimensions (again, width 16 / height 13 works well). If you use GIF images with a transparency value, the transparent color will be replaced by the chosen BgColor.
URL1a, URL2a, . . . URLna
An optional absolute or relative URL to which the correspondingly-numbered item should link when clicked. In the code opposite, items 2, 3, 5 and 6 link to about.htm, contact.htm, applets.htm and win.htm respectively.
As in many Cool Focus applets, each item in TreeView Professional can optionally open 4 URLs into 4 target frames at a click. This brings the b, c and d suffixes into play. For an item to link to a single URL you'd use the 'a' suffix. To link to further URLs, just replace the 'a' with 'b', 'c' or 'd'. In the code opposite, when Item1 is clicked it fetches home.htm, topmenu.htm and bottommenu.htm.
There are two points to bear in mind about using multiple URLs. First, the URLs will be fetched one at a time (although they should appear almost simultaneously) in the abcd order. This leads to the second point: if one of those URLs will load a page over the top of the applet, the applet must stop running. Therefore, if you're trying to load 4 pages, using all four URL parameters, and your URL2b parameter is the one that loads over the applet, the URL2c and URL2d links won't work - the applet stops running before it can process the requests!
As an aid to testing, you can prefix your URLs with a dollar sign ($). You can then click the applet without error messages appearing or being linked elsewhere. Don't forget to remove these signs before uploading the page though!
URL and Target parameters work in precisely the same way for both folders/subfolders and pages. Bear in mind that users will often click on a folder's label expecting just to expand it, so it may surprise (or annoy?) them to find a new document opening - you may prefer not to have your folders linking anywhere. That's easily done: just don't include any URL parameters for your folder items.
Target1a, Target2a, . . . Targetna
The frame or window target names into which the correspondingly-numbered URLs should be opened. Any URL that doesn't have a matching Target parameter will use the one specified in the DefaultTarget parameter instead. As you can see from the code in the left frame, Item1 has 3 URLs (URL1a, URL1b and URL1c). URL1a uses the DefaultTarget, but separate target names are specified for URL1b and URL1c by including the Target1b and Target1c parameters. Item2 also specifies a Target parameter (Target2a) to open its link (URL2a) into a frame called 'newWindow'.
.