LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Newbie question - how to programatically reset all cell formatting

Solved!
Go to solution

I have learned to set table cell formatting for the active cell.

I do not see a property or method for table that resets all cell formatting.

How would one reset all table cell formats that were previously formatted before reusing a table?

I am clearing the data in the table first. This does not clear formatting. 

 

Old table formatting:

Image 15.png

 

0 Kudos
Message 1 of 5
(1,033 Views)
Solution
Accepted by topic author flycast

You can set "active cell" to ALL by using negative indices, followed by setting BG color, font style, etc. etc.

Check the help! (In your case you would select active cell = -2, -2)

 

Message 2 of 5
(1,021 Views)

When you set the active cell, you can select all cells by entering "-2" instead of a single cell by selecting 0 or greater.  So if you set the active cell to -2,-2 you should select all of them, then set the new format for all of them at once.

 

Details here:

 

https://zone.ni.com/reference/en-XX/help/371361R-01/lvprop/table_active_cell/

 

0 Kudos
Message 3 of 5
(1,018 Views)

@altenbach wrote:

You can set "active cell" to ALL by using negative indices, followed by setting BG color, etc.

Check the help!

 


It can't just be negative.  -1 selects headers (in a row or column).  -2 selects all cells and the header (of a row of column).  So to select all of the cells, you set the "Active Cell" index to (-2,-2).

 

Edit: Just double checked he help and corrected the above statement.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 5
(1,017 Views)

@crossrulz wrote:
It can't just be negative. 

I just meant that (some) negative indices have special meaning. To save words, that's why I linked to the help. 😉

0 Kudos
Message 5 of 5
(1,013 Views)