Tree views

Use a tree view to display objects, such as folders, in a hierarchical manner.

Objects in the tree view are nodes. The highest node is the root node. A node in the tree can have child nodes under it. A node that has a child is a parent node.

Users can perform the following action in a tree view:

Action

BlackBerry
devices without a touch screen

BlackBerry devices with a touch screen

Expand or collapse an object with a plus sign (+) or minus sign (-) in a hierarchy
.

Press the Space key
or click the trackwheel, trackball, or trackpad.

Click the screen.

Best practice: Implementing tree views

Use the TreeField class to create tree views.

On BlackBerry
devices with a trackball or trackpad, provide a context menu if users can perform multiple actions when they click a parent node. For example, when users click a folder that contains subfolders and files, a context menu should appear that allows users to either expand the folder or view the files.

Include a root node only if users need the ability to perform actions on the entire tree. Otherwise, exclude the root node.