LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Artefact when hiding tabs on Tab Control

Solved!
Go to solution

Hi guys,

 

I have a question about Tab Control. I show/hide tabs in my program when I log in/out.

When hiding the tabs, the right hand side border of the last tab, stays visible and it's driving me mad.

You can make it go away by either resizing the window, or making sure the last tab was selected during the time when hiding the tabs.

 

I mocked up two quick vi's to explain what I mean (LV2020). It happens on the deployment PCs too, so I know it'd not just some drivers on my own PC.

 

Is this a known bug? Is there an easier way, some option I'm not aware of? What do you guys think?

 

Thanks

Johnny

Download All
0 Kudos
Message 1 of 7
(1,355 Views)

Yes, I see it too.

 

 

0 Kudos
Message 2 of 7
(1,322 Views)

Yes, the workaround is a bit circuitous. Here's how I would do it instead.

 

altenbach_1-1651161381981.png

 

 

Message 3 of 7
(1,314 Views)

For simplicity and scalability, I would even eliminate the case structure and always do the workaround song&dance. Now and combination of visible pages will be treated the same. 

 

altenbach_0-1651162858279.png

 

Message 4 of 7
(1,298 Views)

Thanks for your reply, I'm glad I'm not the only one who sees that thing! Since I switched to Labview my pedantism is at an all-time high, I spend way too much time aligning various items, wires and paying attention to small things like this 😂.

 

Thanks for taking time to come up with another solution. I know a lot of people don't like timed/stacked sequences, but personally it gives me much less of a headache when trying to understand the flow. Your solution is much more sophisticated and well, you can see it all on one page!

 

Here's another way it can be done, by resizing the window and restoring it to its original size.

0 Kudos
Message 5 of 7
(1,245 Views)
Solution
Accepted by topic author JohnatanBravo

The problem with stacked sequences is that in order to understand the flow, you need to constantly flip through the frames and and have a good enough short term memory to remember all other frames. 😄

 

All your value properties in frame=0 should be local variables.

 

Here's how you can do the same size twiddle with much less (and much cleaner!) code:

 

altenbach_1-1651250666970.png

 

The problem with your code is still scalability because if you later decide to hide other adjacent or non-adjacent tabs, you would need to make changes all over the code. in my example, all you ever need is change the boolean diagram constant, assuming that tab 1 should always be visible (else we could even switch to the lowest visible tab with a little bit mode code). It is always a good thing to only have a single instance of the visibility loop. Half the code!! You can easily expand to have more than two visibility states, by just indexing into an array of booleans with the state variable.

 

Message 6 of 7
(1,212 Views)

Thanks for your help and all the input.

0 Kudos
Message 7 of 7
(1,177 Views)