LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to duplicate indicator in each in tab control page?

Solved!
Go to solution

I have a tab control with 3 pages, each page containing a similar chart. 

 

The charts have an unpredictable number of plots that is dynamically determined at run time.

 

I don't like the chart's native plot legend, because I only want to display a few legend entries, not the entire legend.

 

So instead, I made a table with colored cells and text which changes in length at run time (adjusted via property node).

 

I can place this plot legend next to the tab control like this:

 

LabView How To Duplicate Indicator In Tab Control.PNG

 

Now I want to use the "Get Image" method to save images of each tab control page. This works well, but it is missing the plot legend.

 

Is there a way how I can have my own plot legend included in each page of the tab control? For example, can I display a "clone" of the plot legend table in each tab control page?

 

Basically I need a convenient way to duplicate my "Plot Legend" indicator, including font color, cell color, table length, etc. dynamically at runtime.

 

How should I do that?

 

Note: If I place my table indicator floating in front of the tab control, it is visible on every page, but the "Get Image" method will of course omit it.

0 Kudos
Message 1 of 7
(4,747 Views)

Often an easier approach is to put the control (your legend) on top of the tab, rather than inside it. You can do this by selecting it and moving it with the arrow keys. It will show a black shadow at edit-time (to show you that it's on top, not inside) but you won't see that at run-time. That way your legend will show up on all the tabs, and you can adjust the settings when the tab changes (and, if you don't want it visible on a particular tab, hide it when that tab is shown).

0 Kudos
Message 2 of 7
(4,739 Views)

 

@nathand wrote:

Often an easier approach is to put the control (your legend) on top of the tab, rather than inside it. You can do this by selecting it and moving it with the arrow keys. It will show a black shadow at edit-time (to show you that it's on top, not inside) but you won't see that at run-time. That way your legend will show up on all the tabs, and you can adjust the settings when the tab changes (and, if you don't want it visible on a particular tab, hide it when that tab is shown).


Thanks for your reply. If I do this, the indicator is visible, but the "Get Image" method on the tab control will of course omit it. 

 

Is there another way? I might have to do "Get Image" on the entire FP, but that is not necessarily ideal either.

0 Kudos
Message 3 of 7
(4,732 Views)
I know this isn't what you asked about, but mixing graphs or charts with tab controls is heading you towards trouble. There is a long history of problems caused by that combination. Plus there's the added code complexity that tabs can produce.

You should consider having one chart and simply switching different data to it based on what the user selects in, say a ring control.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(4,712 Views)
Solution
Accepted by topic author Gustep12

This is a little messy but it gets the job done. It does take an image of your entire front panel though so if there are controls you don't want included in the image, they'll have to be edited out after the fact.

 

 

0 Kudos
Message 5 of 7
(4,696 Views)

@mikeporter wrote:
I know this isn't what you asked about, but mixing graphs or charts with tab controls is heading you towards trouble. There is a long history of problems caused by that combination. Plus there's the added code complexity that tabs can produce.

You should consider having one chart and simply switching different data to it based on what the user selects in, say a ring control.

Mike...

 

Actually, it works really well. I have a ton of data in each chart, and yet switching between the tabs is instantanous. Never had a problem so far.

 

Occasionally, I also dynamically hide / reveal / recolor the 100+ plots in each chart. That is rather slow.

 

I haven't tried swapping out the entire chart data at once, probably that would be upwards of 40k+ data points for each chart. Are you saying that would be as fast and responsive as switching between tabs?

 

 

0 Kudos
Message 6 of 7
(4,681 Views)

@B_Strange wrote:

This is a little messy but it gets the job done. It does take an image of your entire front panel though so if there are controls you don't want included in the image, they'll have to be edited out after the fact.

 

 


Sorry I can't look at your code right now, but yes, at picture time (program completion)* I decided to iterate through the tabs while invoking "Get Image" on the VI's entire front panel each time.

 

 

It works well and actually looks a little nicer / more informative than just the tab control by itself.

 

*(The images serve as a visual index / photo album of the saved numeric data.)

 

0 Kudos
Message 7 of 7
(4,678 Views)