Menu-Style TreeView Design

As with the Folder Style example, here we're using CSS to control the styling of our TreeView Control's node icons. The CSS and image assets for the Menu Style are available as part of the YUI download package.

This example also implements MenuNode instead of TextNode for node creation. Only one MenuNode can be open at a given depth at the same time. This creates an interaction in which nodes close up behind you as you open new ones, keeping the vertical size of the TreeView more compact during navigation.

Collapse all