LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Chart Legend Doesn't Resize Automatically in a Strict TypeDef Tab Control

I have been trying to figure out if this is a bug with something I'm doing or if it is unexpected behavior in LabVIEW.

 

I have a chart with a plot legend that is supposed to autosize itself based on the string input into the legend. It austosizes as expected under the following conditions:

  • Chart is placed on the front panel by itself.
  • Chart is placed inside of a tab control.

The plot legend autosizing doesn't work when the chart is placed inside of a strict TypeDef tab control.

 

I've attached example code (LabVIEW version 26.1f0) with the above three scenarios. Am I doing something wrong by placing the chart inside of a strict TypeDef tab control, or should the plot legend autosizing work as expected in the other two scenarios?

0 Kudos
Message 1 of 4
(255 Views)

"Strict Type Definition control forces almost everything about the control to be identical, including its size, color, and appearance."

...

"For example, if you have a Strict Type Definition that is made up of a cluster of various controls, properties for each individual control would not be available. Only appearance properties for the overall cluster would be available."

 

From here:

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019KnUSAU&l=en-US

 

That's in reference to a cluster, not a tab, but at a guess the same principle applies.

Message 2 of 4
(241 Views)

Thanks Kyle. I agree for instances of a cluster since the controls are placed in the cluster when setting up the typedef. But the tab is its own strict typedef and the chart is placed inside the tab after the strict typedef tab control has been created and placed on the front panel of the vi. I guess the easiest solution is to change to a standard typedef instead of a strict for my tab control. Thanks again for the information.

0 Kudos
Message 3 of 4
(217 Views)

IIRC, tab enums are kind of flaky. kind of fragile.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 4
(77 Views)