6. Creating and Using Basic Fields : Scalar Fields : Tree Views
 
Share this page                  
Tree Views
A tree view field presents the end user with a hierarchical list of items in a tree structure that can be expanded or collapsed. Each item in the tree view consists of a label with an optional icon, and each item may also have an associated list of subitems.
The contents of the tree view can be displayed with buttons that expand and collapse subitems and with lines that link subitems to their parent items. Other end user options include highlighting the selected item in the tree view and editing item labels.
An example of a tree view field is OpenROAD's Field Tree window, discussed in Field Tree (see Field Tree). For example, the following Field Tree window displays the hierarchy of the fields in the Main frame of the SIS sample application:
Each item has a text label and an associated icon. Also, each branch of the tree can be expanded or collapsed, as indicated by the + and - buttons to the left of the icons, including the root of the tree, Main.
Note:  The contents of a tree view are defined programmatically. Even though you can place a tree view field on your form and specify its properties, you cannot define its contents using the Frame Editor. Therefore, it initially appears empty. For more information about tree view fields, see the chapter "Working with List Views and Tree Views" in the Programming Guide.