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: 

Cell Justification Property for the whole table not setting properly

Dear all!

 

In my exploration of the LabVIEW table control (LabVIEW 16, 32 bit), I have found this runtime-dependent behaviour of the table control and was able to reproduce it: When setting the justification of cells, setting the justification for the whole table via the (-2, -2) address only works once. If a specific cell has been set to a specific justification, the justification of that cell will be updated to the new global justification, but if the specific cell justification it is then set again, it will no longer be overwritten by a global justification.

 

I was surprised by this behaviour and believe it is unintended. Can anyone comment on if this is intended or present in newer versions of LabVIEW?

 

The steps the reprocude:

 

Spoiler

 

  • Create a new VI, set up a table control.
  • Fill the table with some sample strings, especially the first cell.
  • Add two property nodes for the table with these properties and have them execute in sequence: First, set the Active Cell , then set the Active Cell Justification 
    • For the first node: Set the Active Cell to (0, 0) and the Justification to "Center"
    • For the second node, Set the Active Cell to (-2, -2) and the Justification to "Left"
  • Run the VI
    • All entries in the table are now justified to the left.
  • Run the VI again
    • All entries remain on the left, but the top left cell is now center justified.
  • Change the Justification on the second property node to "Right"
  • Run the VI
    • All entries in the table are now justified to the right.
  • Run the VI again
    • All entries remain on the right, but the top left cell is center justified again.
  • The effect can also be procuced by chaining two sets of these two nodes together. The effect is than as if the VI had been run twice, with the "special" cell having the odd justification

I believe that the justification for the whole table (index (-2, -2)) is saved with the table and when trying to set it a second time, LabVIEW sees this as a NOOP for optimization.

Message 1 of 3
(1,378 Views)

Hello, LLindenbauer

I am running on LV 2020 and in my case the top left cell sets up to center after first run and not changing after the next iterations. Which version of LV do you run?

Regards

0 Kudos
Message 2 of 3
(1,309 Views)

@Hamlet23 wrote:

Which version of LV do you run?

Hi! I'm running LabVIEW 2016.

I have attached a VI that displays this behaviour:

LLindenbauer_1-1604408886302.png

LLindenbauer_0-1604408631053.png

 

 

 

0 Kudos
Message 3 of 3
(1,078 Views)