LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi Column List Box in CVI

LabView discussions and samples are full of the term 'multi-column list box'.  Yet there is relatively little discussion of this term when it comes to CVI.  It would be useful to know some of the latest techniques to use to develop and use a multi-column list box for CVI; with something more robust than the present CVI samples.   Do we have to go to  Active-X or  utilize some of the fancy C++ list-box classes?

Appreciate the feedback on this...
0 Kudos
Message 1 of 4
(4,297 Views)
In CVI, a 'multi-column list box' can be created from a List Box (with embedded escape sequences), a Tree control or a Table. Which one you use depends on what exactly you want to do.

What do you want to do?
--
Martin
Certified CVI Developer
0 Kudos
Message 2 of 4
(4,285 Views)
Perhaps a tree control based example (or examples) of a multi-column list box would be instructive for all to see...    Some features would be the ability to examine, or change, the contents of a column within a selected, highlighted (or checked) row.  Determining the indexes of multiple, highlighted row selection would be another.

Thanks
0 Kudos
Message 3 of 4
(4,278 Views)

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

 

0 Kudos
Message 4 of 4
(4,246 Views)