LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get case structure to recognize tab names?

I have a tab control.  In my VI, I use a local variable reference to this tab control to switch a case structure.  When I first made this program, it made sense to call these tabs CS0-CS13.  Long story short, that no longer makes sense.  I have changed the names of the tabs in the front panel, but in the case structure they still show up with the old CS names.

 

I tried deleting the local variable, recreating, and hooking it up to case structure, but no difference.  If I manually delete the name CS out of the case structure and replace it with the new name, it doesn't recognize it.

 

In other words, it seems to be only remembering the name from the first time I created this tab.  Where do I change this?

0 Kudos
Message 1 of 6
(2,898 Views)

Hmmm, I cannot reproduce the issue.  When I hook up the local variable to a case structure, the local variable appears as an enum so the changes are immediately reflected in the case structure.  I'm using LV 2012 SP1 - which version are you using?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(2,883 Views)

I'm using the same version...

 

Something (major) I somehow forgot to mention, although I'm not sure why it would make a difference....the CS names were temporary.  I then programmatically change the names during execution because the final name of the tab I want to be dependent on what board the user selects.  So the very first time I created the tab, I named them CS, then changed them programatically.  The case structure still recognized them by their CS name, which makes sense to me.

 

In any event - these tabs are nested inside a parent tab.  I just checked and you're right...on my parent tab, the changes show up immediately.  So I'm thinking this has something to do with the fact that I change them programatically.  But still...that info has to be stored somewhere, but I don't know where.

0 Kudos
Message 3 of 6
(2,878 Views)

@bmishoe wrote:

I'm using the same version...

 

Something (major) I somehow forgot to mention, although I'm not sure why it would make a difference....the CS names were temporary.  I then programmatically change the names during execution because the final name of the tab I want to be dependent on what board the user selects.  So the very first time I created the tab, I named them CS, then changed them programatically.  The case structure still recognized them by their CS name, which makes sense to me.

 

In any event - these tabs are nested inside a parent tab.  I just checked and you're right...on my parent tab, the changes show up immediately.  So I'm thinking this has something to do with the fact that I change them programatically.  But still...that info has to be stored somewhere, but I don't know where.


Hmmm, I think it might be time for some code.  🙂

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(2,876 Views)

The strings that show up in the case structure are the enum strings of the tab control.  These are the "Page Labels" and can only be changed at edit time, not at run time.  The strings that you are changing at run time are the "Tab Captions".

"If you weren't supposed to push it, it wouldn't be a button."
Message 5 of 6
(2,823 Views)

Paul nailed it, you're changing the Captions. That's just a visual label, not the actual name of the tab. The name is the Label and can only be set during edit.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 6
(2,811 Views)