12-17-2020 11:20 AM
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:
Solved! Go to Solution.
12-17-2020 11:31 AM - edited 12-17-2020 11:33 AM
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)
12-17-2020 11:34 AM
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/
12-17-2020 11:35 AM - edited 12-17-2020 11:38 AM
@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.
12-17-2020 11:38 AM
@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. 😉