LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control bug?

I have a problem with tab control which has been bugging me for a long time and i can't seem to solve it.

I have a tab control with 4 pages, A, B, C and D. All these pages are invisible at the beginning. Once the user selects the page from the custom run-time menu, the appropriate page then showns up (PageVis=True). Now, when i try a few more times switching between different pages, some pages showns up together with the intended page. Once i click the correct page's tab, the others disappear. Now this is a problem because when a user is using page A, i do not want he/she to be able to access other pages.

Can someone help me before i kill someone? Thanks.
0 Kudos
Message 1 of 9
(2,808 Views)
Hello,

I don't know if its a bug.

But I would choose to use "Enable" and "Disabled and grayed out"  instead.

Maybe you could try to add some sequencing in the code and only change properties of pages that need changing.

Array of settings and array of pages, do setting in a For loop.

Hope it helps you.

Kind regards,

André
Regards,
André (CLA, CLED)
0 Kudos
Message 2 of 9
(2,792 Views)
Thanks for you comment. I've managed to solve it using the value property.
0 Kudos
Message 3 of 9
(2,788 Views)
Hi,

The PageVis property hides the referred page. If you hide the page, but no other is visible, this will produce an error. If then another is made visible, two of them are visible. Note that the order the property nodes in your example are executed is not defined. You can enforce this by wiring the errors.

Another (more common) way to achieve what you want, is to use the terminal of the tab, or a local. A tab is really an enum. So you can simply put a value in it, and the tab will switch to that page. If you hide the tab selector (make the tab an indicator, or catch the value changed event), the user has no other way to select a tab.

Regards,

Wiebe.
0 Kudos
Message 4 of 9
(2,785 Views)
Yes Wiebe! That's exactly what's happening to my VI!

You mentioned the order of the property nodes are not defined. Meaning, in a 4 page array depending which is the current active page, page1 might not always correspond to index0?

"Another (more common) way to achieve what you want, is to use the terminal of the tab, or a local. A tab is really an enum. So you can simply put a value in it, and the tab will switch to that page. If you hide the tab selector (make the tab an indicator, or catch the value changed event), the user has no other way to select a tab."
(Can you show me?)

Thanks alot
0 Kudos
Message 5 of 9
(2,747 Views)
The order of the property nodes is not defined because you have no dataflow between. Execution order is not defined by where a function is on the block diagram (left, right, top bottom), but how data is connected. You have no connections between the properties so they execute in parallel and you have no way of knowing which one will actually execute first. The simplest way to enforce dataflow is with the error in/error out connections. That is shown below. also shown is one way to select the active page. I used a local variable but if you make the tab control an indicator instead of the default control, just wire a value to the terminal itself.
 

Message Edited by Dennis Knutson on 07-26-2007 08:16 PM

Message 6 of 9
(2,734 Views)
You (Vcteo, not Dennis) should really run the original VI with the highlight execution (little light bulb) on. And then Dessis's VI. This will illustrate that the order of execution is completely arbitrairy, unless you force it.


Since this is the essence of LabVIEW, you'll have to understand this to succeed.


Regards,


Wiebe.
Message 7 of 9
(2,713 Views)
Thanks guys for your advice. It's been a great help.
0 Kudos
Message 8 of 9
(2,707 Views)
Another suggestion I would offer is to drop the tab control. There are far better ways of accomplishing what you want - like subpanels.

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 9 of 9
(2,681 Views)