12-10-2014 02:26 AM
Hi community,
there's always so much more to learn about LabVIEW.
I have a tab control that is a (non strict) type definition. It has 5 tabs containing indicators.
When I open the type def and insert another tab at, say position three and close type def, the tab control on my fp will of course gain the extra tab.
But the new tab number three will contain what the old tab number three contained and the only the last tab will be empty.
That's not what I intended. I suspect I'm doing it wrong.
Is there a way to get an empty tab at position three without defeating the purpose of a type def (because obviously I could decouple the control from the type def, insert the tab and make a new type def).
Best Regards
Florian
Solved! Go to Solution.
12-10-2014 03:30 AM
A typedef can contain only a single control and in your case it is the Tab Control - the typedef will contain just 5 tabs and NOT have any other indicators. So when you add a page to the Typedef all its instances will reflect only the tabs and not any controls. Can you explain the purpose of making a tab control as a typedef?
Thanks,
Priyadarsini S
12-10-2014 05:15 AM
Thanks for answering,
I am aware that the type def contains ony the tab control. My problem (which I didn't explain very well) is that I wanted to insert a tab in the middle and push the existing tabs back.
I had tabs a,b,c,d,e and wanted to insert a tab f at the third position so that I get the tabs a,b,f,c,d,e.
This works well when I have an ordibnary tab control.
With the type def I get tabs labled a,b,f,c,d,e - but the contents of the tabs behave differently from the non type defed tab control.
The contents will be a,b,c,d,e,f after inserting tab f at the third position in the type def.
The tab control is a type def because I use the value of the tab control in other places of the code to conditionally refresh xy graphs etc.
I thought that once I start using the tab control as input for sub vis I'd be save if I used a type def. Do you think it's unecessary?
Best Regards
Florian
12-10-2014 05:54 AM
Florian,
I hope that you will display the Tab Control as an UI in only one place. In that case you can have an enum typedef to pass it in subVIs and disconnect the Tab Control from the typedef.
Thanks,
Priyadarsini S
12-10-2014 06:05 AM
Thanks again Priyadarsini,
I do indeed display it only in one place on the fp. You're right, I can work around this the way you described.
Best regards
Florian