LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

multi row / rowspan table header

Solved!
Go to solution

I need a table with a head consisting of several rows and columns.

Is that possible with CVI, and if so how?

0 Kudos
Message 1 of 6
(5,677 Views)
Solution
Accepted by topic author susay

Table column or row headers can be multiline as (almost) any other text element in CVI panels: you can obtain itby pressing Ctrl+Enter while editing the text in the UIR editor. You will need to increase header row dimension to fitthe newlabel.

 

On the other hand, unfortunately it is not possible to have more than one header line in native CVI tables. Moreover, it is not possible to merge cells on some row as you can do in Excel, so when I need a more complicated arrangement for headers I normally use a separate table for it. The "header table" is set as an indicator and I set cell widths according to my needs.

 

You may see both tricks in this example:

 

MultiHeaderTable.PNG

Message Edited by Roberto Bozzolo on 02-24-2010 10:52 AM


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?
Message 2 of 6
(5,671 Views)

I need no normal multiline.

Ok so I musst use a separate table.

 

Thank you.

0 Kudos
Message 3 of 6
(5,667 Views)
Unfortunately, the solution does not help me because my table must include a indeterminate amount of data. In other words, the table should be scrollable. But I can not scroll synchronously 2 tables or do you?
0 Kudos
Message 4 of 6
(5,615 Views)

As far as I can understand, only horizontal scrolling should affect your situation, as the table header should not need to change in case of a vertical scroll.

In any case you should be able to trap EVENT_HSCROLL (and even EVENT_VSCROLL) in the table callback, get the first visible column (row) and scroll consequently the additional header table. You could also try to see if it that column is suitable for the separate header table (in my example, scrolling horizontally by one column only will not permit syncronous scrolling of the two tables): in case it's not, you could try adjusting both tables by using SetCtrlAttribute (panelHandle, PANEL_TABLE, ATTR_FIRST_VISIBLE_COLUMN, x) with an appropriate number of columns in 'x'



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?
Message 5 of 6
(5,609 Views)

Ah, thank you. The tables now scroll with horzontal EVENT_HSCROLL.

 

The table below has the scroll bar. It scrolls only in small steps, and whenever a new column has reached the top jump to the next column. It does not look good.
The table below should scroll only whole columns. How can I do that?

0 Kudos
Message 6 of 6
(5,581 Views)