The CM tree view is very versatile and can be used as both a "List box" and a tree view, as well as 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:
Direct select has to do with keyboard input only. It means that when the user presses arrow key up or down, the selection is instantly changed (moved). When direct select is off (which is the default), the arrow keys does not modify the selection, it only moves the highlighted item. (You may toggle the select state of the highlighted item with SPACE.)
The 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.)
The 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 single item) and Shift (select range).
Multi-select using keyboard
When direct select 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 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 childen 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"