The CM tree view is very versatile and can be used as both a "List box" and a tree view, as well as a drop down. The tree view is populated with TreeViewItem's and these are also used to populate menu bars and popup menus.
Select Modes and Behavior
There are three flags that primarily decide the select behavior:
directSelect has to do with keyboard input only. It means that when the user presses the arrow key up or arrow key down, the selection is instantly changed (moved). When direct select is off (which is the default), the arrow keys do not modify the selection, it only moves the highlighted item. (You may toggle the select state of the highlighted item with SPACE.)
alwaysMultiSelect mode means that whatever item you click on will be toggled (selected or deselected) and all other items that were previously selected will remain selected. (Like if you would be holding down the Ctrl key while selecting files in Windows Explorer.)
allowMultiSelect mode behaves like Windows Explorer. Clicking on an item selects it and any previously selected items are deselected, but you may still perform multi-select using the Ctrl (add/remove a single item) and Shift (select range).
Multi-select Using Keyboard
directSelect is off and
allowMultiSelect is on, you should be able to perform multi-select using the arrow keys, Shift, Ctrl, and SPACE. Move the highlight using the arrow keys. Then use SPACE as a mouse click. Ctrl and Shift keys should work the same way as when selecting with the mouse.
More about Arrow Keys
- Right on a closed item with children means "open and move to first child"
- Right on an open item means "move to first child"
- Right on an item without any children mean "move down" (this differs from Windows)
- Left on an open item mean "close"
- Left on a closed item (or one without children) mean "move to parent"