|
To view the applet tag in use here, right click inside the left frame and choose View Source The example on the left is a fully-working replacement for this documentation's table of contents. Choosing 'Example #3' from the Examples folder will bring you back to this page; choosing 'Home' at the bottom of the tree will return you you to the usual HTML contents. This example demonstrates several things: 1. We've specified images for almost every item, the only exceptions being the 17 links to the separate parameter explanations: because no images are specified for these separately, they take the image specified by the SingleImage parameter. For neatness we've used the same pair of images for every folder, but of course that's entirely up to you. Similarly we've only specified one image for each 'page' link, but we could have specified a second so that the image changed when the link was clicked. 2. The folder named 'The Parameters Explained' has a URL parameter, so a click opens a page as well as expanding the tree. Note that the separate parameter-name links in this folder use # anchors: not all browsers support them, so their use is generally best avoided. We didn't avoid them, but we never do what we're told. 3. The 'Home' link opens 2 documents. The first opens into this frame, the frame set in DefaultTarget; the second opens over the applet - it must therefore be the last link the applet has to process when multiple links are used. 4. We've specified ScrollBgColor and ScrollFgColor for this example to get away from the default system colors of the scrollbars. Finally, we've said several times that if a folder is to contain both folders and pages, the pages must be added first: if you add a folder and then add pages, they'll be placed in the folder you added. The example to the left shows the exception. How did we get those 3 links at the bottom of the tree when they're in the first level? Simple - we gave them an asterisk each so that the applet thinks they're first-level folders. The applet doesn't place a plus or minus box beside them because none of them contains any sub-items. And they don't have folder images because we've specified a different image for them. They each have a URL parameter, so they look and act exactly like 'page' links. You can arrange items in any order you like in any folder by bearing this in mind. Below are three examples that throw their folders and pages together in a random-looking way. The first is in 'plain' mode, the second uses the set of images specified in the SingleImage parameter. As you can see in the second example, we've told the applet that items such as 'Menu Systems' and 'Button Links' are folders, so it gives them folder icons. To get around this, as the 3rd example shows, you just specify a different image for them. In this case we've told each to use 'doc.gif'.
|