From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Does anyone know how to create a table with multiple headers?

Solved!
Go to solution

So basically I would like to have headers on the first two rows.I want these headers to be constant so that they remain on the table even when I'm running the code.  I tried using multicolumn listbox and I kept getting only 1 option.  Any idea? suggestion?

GRCK5000_0-1651507381059.png

Thanks,

 

GRCK5000

 

0 Kudos
Message 1 of 8
(1,250 Views)

Tables are just 2D arrays of strings. You have full control on what's in any of the cells. No need to even use the headers. You can even create multiline cells.

0 Kudos
Message 2 of 8
(1,241 Views)
Solution
Accepted by topic author GRCK5000

Quick example:

 

altenbach_0-1651509446086.png

 

You can easily change the font style and background color of the headers (or any cell you like)

 

0 Kudos
Message 3 of 8
(1,225 Views)

Thanks a lot Mr. Altenbach. As soon as you told me that a table is nothing but a 2D array. I worked hard and I was able to accomplish what I wanted. Your codes are so insane. I have a very very long way to go to get on your level. Thank you very much!

LabView community/forum definitely needs you.

0 Kudos
Message 4 of 8
(1,208 Views)

That solution will work well enough if you don't need to scroll your table.  If you do you can either try to use the property nodes to read what the top left cell is, and then set the values based on that, and any cell background color.

 

Or you can use the normal column headers, but have multiple rows of text in each cell.  I couldn't get to setting the column values from the front panel.  But using property nodes I could make multiple rows of text for a Table or a Multicolumn Listbox and it would display it properly.

Message 5 of 8
(1,129 Views)

Also, if the headers are truly static, you could even use the caption. 😄

Message 6 of 8
(1,124 Views)

Thanks Hoovahh, the CAN master, for the suggestion. Yeah, Mr. Altenbach would use anything to get the results he wants. If he cannot use property nodes, he'll come up with something. 😅

0 Kudos
Message 7 of 8
(1,117 Views)

I know for sure  you can use anything to get the results you want. I will not doubt what you can do. 😅

0 Kudos
Message 8 of 8
(1,116 Views)