Baumansichten

A tree control allows the user to inspect, manipulate or select from a hierarchichal list of items. Trees may have one or more columns, and contain text, graphics, simple controls, or a combination of all three.

Verwenden Sie Baumansichten sparsam!

Because of their complexity compared to other controls, novice and some intermediate users often have problems using and understanding tree controls. If your application is designed for that type of user, you might want to consider alternative ways of presenting the information, such as the Nautilus list or icon view, or the hierarchical browser lists found in GNUstep's File Viewer.

Abbildung 6-21A simple tree control with one level of hierarchy
Richtlinien
  • Always give tree controls a label, positioned above or to the left of the tree, in sentence capitalization. Provide an access key in the label that allows the user to give focus directly to the tree.

  • Use column headers when:

    • the tree has more than one column
    • the tree has only one column, but the user may wish to re-order the tree. This should rarely be true of single column trees.

    In den meisten anderen Situationen nehmen Spaltenköpfe nur unnötig Raum ein, und das zusätzliche Label erzeugt eine gewisse visuelle Zersplitterung.

  • Beschriften Sie stets vorhandene Spaltenköpfe. Falls die Spalte für eine Beschriftung zu schmal ist, verwenden Sie eine Minihilfe für diese Spalte. Ungeachtet des eigentlichen Zwecks stellt dies sicher, dass Hilfstechnologien den Benutzern mit visuellen Einschränkungen eine Beschreibung zur Verfügung stellen können.

  • Consider using a check box tree for multiple-selection trees, as these make it more obvious that multiple selection is possible:

    Abbildung 6-22A simple check box tree

    If you do this, you should normally set the tree control itself to be single-selection, but this depends on the particular task for which it will be used.

  • For multiple selection trees, show the number of items currently selected in a static text label below the tree, for example, Names selected: 3. Such a label also makes it more obvious that multiple selection is possible.

  • Consider providing Select All and Deselect All buttons beside multiple selection trees, if appropriate to the task.

6.15.1. Sortierbare Baumansichten

As with lists, the user may find it useful to sort long or multi-column trees. See the guidelines in Abschnitt 6.14.1 ― Sortierbare Listen for more information.