LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Table programming in CVI 6

Hello ,

I make a table in CVI , but once loading it , it always auto focus an item(see the attached) ,how to resolve the problem ?

How to attach an icon beside an item ?
When click an item , I want to the full row is in selected status , How to do this ? Thanks.

David
0 Kudos
Message 1 of 4
(3,294 Views)
To highthlight the row clicked with the mouse, you must use a trick descrived here.

Once obtained the cell pointed to, you can highlight its row by using

SetTableSelection (panel, control, VAL_TABLE_ROW_RANGE (row));

Hope this helps
Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(3,294 Views)
Hi Roberto ,

But how to avoid to make an item in not selected status when first show it ? how to combine an image and a text in a cell ? Thanks.

David
0 Kudos
Message 3 of 4
(3,294 Views)
David,

The CVI table control accepts pictures as a datatype, is just amatter of editing the control. Once you have inserted some rows or columns you can select any cell and define the type as a picture; then it will allow you to load or paste images in the cells.

Of course you can also do this in you code using the setSetTableCellVal(). There is an example that ships with CVI that should help you with this. it is in:
C:\Program Files\National Instruments\CVI70\samples\userint\colview.prj

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 4 of 4
(3,294 Views)