04-22-2013 11:29 AM
Hello All,
I am attempting to use scripting to add new tabs to a tab control in an existing VI. I am able to add the new tabs pretty easily, but I cannot figure out how to change the name of each tab as they are added. Each name is extracted from a TDMS file using a for loop.
I have looked through the existing discussion forums, and there are a few older posts that indicate I should be looking for the "Independent Label Property", and that I should set this to allow me to change the tab caption. There is still an explanation of this property in the help files, but I am unable to find my way to it in the actual block diagram.
Assuming that this property still exists in my version (2012), could somebody point me to the correct sequence of references and property nodes to get to this property? Right now I am using the "TabControl" class. If this particular property is obsolete, can somebody let me know if there is a new method to achieve this? Thanks.
GSinMN
Solved! Go to Solution.
04-22-2013 12:03 PM - edited 04-22-2013 12:04 PM
After you add the page, get the Pages property of the Tab Control, index to the newly added page, use the PageLabel property of that page to set the label. It would be cool if the Add Page method returned the reference to the new page.
04-22-2013 12:27 PM
Hello Darin,
Thanks for the quick response. Your message gave me an alternate method, and also pointed to the solution to correct my method. I was still using the refnum for the Tab Control. What I needed to do is open a new "sub" refnum for the page. From there, the IndependentLabel and TabCaption properties were easy to find. Yes, it would have indeed been easier if the "Add Page" property automatically provided a refnum for the page it added.
Thanks again,
GSinMN
06-17-2013 01:22 PM
Can you kinldy add an example that shows how you created /added additional pages?
Thanks
06-18-2013 02:18 PM