LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control: line all objects in different tabs

Solved!
Go to solution

I have a tab control with 6 tabs.  Each tab has exactly the same things: two graphs and a numeric indicator.  I want the objects on each tab to overly each other perfectly.  When the user switch from page to page, I do not wish the user to see any shift due to misalignment for objects among the tabs.  What is the easiest way?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 8
(3,214 Views)

Create one tab and duplicate 5 times.

 

If all of the tabs are identical I would consider floating the controls so they are always visible and using the Tab control to change the contents of the controls. 

Message 2 of 8
(3,208 Views)
Solution
Accepted by topic author jyang72211

Create a property node to each element and copy the Position from one indicator to all the other indicators of the same type.

 

See attached.

 

Alternatively, you can use an array of clusters instead of a tab control.  Put the graphs and numeric indicators into a cluster.  Put these into an array.  Only display one element of the array at a time, but use the array control to change which is visible.

 

This will probably make your code more streamlined and logical too.

Message 3 of 8
(3,207 Views)

What do you mean by floating the controls?  What do you mean by "If all of the tabs are identical I would consider floating the controls so they are always visible and using the Tab control to change the contents of the controls"?

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 4 of 8
(3,203 Views)

If you use the arrow keys to move a control over a Tab control instead of dragging, the control will "float".  You will see the shadow while in edit mode.  These floating controls are not inside the Tab, instead you use the value of the Tab control to choose what data to show in the graph and other indicators.  This way you have three controls instead of 18.

Message 5 of 8
(3,201 Views)

Darin, I think I understand what you are saying, but I am not sure how does it work.  What do you mean by changing the value of the tab control to choose what data to show?  I never use the tab control this way, can you give me an example?  Thanks!

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 6 of 8
(3,180 Views)

He's referring to using the tab's value change event so you can detemine which tab was activated. Based on that you can select which data to send to the graph and indicators. Assuming you decide to use a single graph indicator rather than 5.

Message 7 of 8
(3,174 Views)

Ohh, now I understand.

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 8 of 8
(3,159 Views)