Adobe ColdFusion 8

Image names in a cftree tag

Note: This section applies to applet format trees. In Flash format, you cannot control the tree icons. Flash format uses open and closed folders and documents as the icons. In object format, the image information is preserved in fields in the object structure.

The default image displayed in a tree is a folder. However, you can use the img attribute of the cftreeitem tag to specify a different image.

When you use the img attribute, ColdFusion displays the specified image beside the tree items when they are not open. When you use the imgopen attribute, ColdFusion displays the specified image beside the tree items when they are open (expanded). You can specify a built-in ColdFusion image name, the file path to an image file, or the URL of an image of your choice, such as http://localhost/Myapp/Images/Level3.gif. You cannot use a custom image in Flash format. As a general rule, make the height of your custom images less than 20 pixels.

When populating a cftree control with data from a cfquery tag, you can use the img attribute of cftreeitem tag to specify images or filenames for each level of the tree as a comma-separated list.

The following are the ColdFusion built-in image names:

  • computer
  • document
  • element
  • folder
  • floppy
  • fixed
  • remote

Note: In applet format, you can also control the tree appearance by using the cftree tag lookAndFeel attribute to specify a Windows, Motif, or Metal look.