08-05-2006 11:57 AM
08-06-2006 08:04 AM
08-06-2006 09:33 AM
08-07-2006 10:09 AM
If you want to configure a tree to look like a list box, then disable ATTR_SHOW_CONNECTION_LINES and ATTR_SHOW_PLUS_MINUS. You can also use the listbox api to program with the tree control. Other attributes that you may want to tweak, depending on your needs, are ATTR_FULL_ROW_SELECT, ATTR_SELECTION_MODE, ATTR_ENABLE_DRAG_DROP, ATTR_ENABLE_POPUP_MENU, etc. (See http://forums.ni.com/ni/board/message?board.id=180&message.id=19409&query.id=0#M19409 for some more info)
To add columns to the tree, click on the 'Advanced Tree Options' button on the 'Edit Tree' dialog, and then click on the 'Edit Columns/Cells' button. You can programatically add columns with the InsertTreeColumn function. You can edit at runtime the first column of the tree by hitting <F2>, which makes the text of the first column of the active item go into edit mode. If you need to be able to edit the text of other columns at runtime, then check out the Editable Cell Tree custom control (in the UI editor Create>>Custom Controls>>Toolslib Controls>>Editable Cell Tree). This custom controls allows you to interactively edit the text of any tree cell by double clicking on it.
Check out the treesearch example program in samples\userint\ to see an example of how to determine the indices of multiple, hilited row selections.
Hope this helps,
- jared