06-03-2013 11:10 AM
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?
06-03-2013 11:38 AM
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?
06-03-2013 11:44 AM
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.
06-03-2013 11:51 AM
@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. 🙂
06-05-2013 09:35 AM
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".
06-05-2013 09:54 AM
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