05-12-2015 10:27 AM
If you have a typedef'd tab control, and you rearrange the pages in the typedef, then apply the changes, on the instances of the typedef, only the labels will be rearranged, not the contents of the pages. Each control on the tab control will be on the same ordinal page as before.
05-12-2015 11:43 AM
I don't think that is a bug -- I think that is the intended behavior (a.k.a. "Feature"). The labels on the tabs are names that we give to the data, analogous to naming an indicator that we wire to the output of a function. If we swap the names of two LabVIEW variables, that does not swap their values. Similarly, swapping the names of two Tab pages won't swap their content (values).
Bob Schor
P.S. Maybe I didn't understand the post, but hasn't the Tab Control always worked this way?
05-12-2015 03:18 PM
The name of the method is "Rearrange Pages", not "Rearrange Labels".
If you open a binder and rearrange pages, do only the page numbers move around, or does the content move also?
The bug (yes, bug) does not occur if you rearrange pages on a non-type-def'd tab control.
05-12-2015 05:11 PM
I stand corrected. Still, is this "new" with LabVIEW 2014? I suspect if it has "always been this way" NI will be very reluctant to change it.
BS
05-12-2015 05:31 PM
05-12-2015 05:59 PM
05-12-2015 06:31 PM
@mikeporter wrote:
Whether bug or feature, one thing it is for sure: yet another reason to not use tab controls.
Mike...
And that was the reply I was waiting for...
05-12-2015 08:49 PM
Paul,
Can you post a VI that shows this behavior? I'm mostly asking this because the rest of this post is just based on what I think is happening.
The first thing I noticed was that in the 2013 help for the Rearrange Pages Method it says that it is not available with strict type definitions.
http://zone.ni.com/reference/en-XX/help/371361K-01/lvscript/tabcontrol_rearrange_pages/
I brought up the 2013 help because the 2014 help does not list all of the characteristics that 2013 lists.
http://zone.ni.com/reference/en-XX/help/371361L-01/lvscript/tabcontrol_rearrange_pages/
I think Bob's question is still the most relevant one in this thread. This may not be what we want to happen, but it will only be a bug if it behaves in a way that contradicts documentation or if the bahavior is not consistent from year to year (when documentation does not reflect this of course). I am not at work, but if you can share a VI that demonstrates this behavior I can try it on multiple LabVIEW versions.
05-13-2015 03:02 PM
It's a bug because rearranging pages on a typedef'd tab control produces a different result from rearranging pages on a non-typedef'd tab control.
05-13-2015 04:10 PM
Paul,
If you can post a simple example VI that shows this behavior I would be glad to take a look at to see what is going on and if this is a bug. If it is a bug I will make a Corrective Action Request (CAR) so that this can be fixed in future iterations of LabVIEW. The post I made earlier, that suggested this may not be a bug, referenced the help documentation for the Rearrange Pages Method. This document is linked below and states that the method is not available for Strict Type Definitions.
http://zone.ni.com/reference/en-XX/help/371361K-01/lvscript/tabcontrol_rearrange_pages/
This is the LabVIEW 2013 Help documentation and as I noted in my previous post, the remark on whether or not it is available with strict type definitions in LabVIEW 2014 help was absent. If you would be willing to post a VI that demonstrates this behavior I can try this on my computer using multiple versions of LabVIEW and ask a few colleagues to determine whether this is a bug.