Jump to content
Sign in to follow this  
jeffwass

Tab Control

Recommended Posts

Does anybody know how to add new controls to a tab pane? I am working on a test-executive, and I'd like to have LabVIEW choose which graph to display, depending on what kind of data the user is taking. Ie, either chart or 2-D color graph, etc.

Also anybody know how to add/delete tab panes dynamically? There don't seem to be these options w/ the properties/methods of the tab. thanks.

Share this post


Link to post
Share on other sites
Does anybody know how to add new controls to a tab pane?  I am working on a test-executive, and I'd like to have LabVIEW choose which graph to display, depending on what kind of data the user is taking.  Ie, either chart or 2-D color graph, etc.

Also anybody know how to add/delete tab panes dynamically?  There don't seem to be these options w/ the properties/methods of the tab.  thanks.

4094[/snapback]

what about using hide/unhide properties with pre-created tabs with the differing options?

Share this post


Link to post
Share on other sites
Does anybody know how to add new controls to a tab pane?  I am working on a test-executive, and I'd like to have LabVIEW choose which graph to display, depending on what kind of data the user is taking.  Ie, either chart or 2-D color graph, etc.

Also anybody know how to add/delete tab panes dynamically?  There don't seem to be these options w/ the properties/methods of the tab.  thanks.

4094[/snapback]

I haven't tried this, but the Tab Control reference has a property called Pages[], and methods called Add Page, Dup Page, and Remove Page.

A Page reference has properties for getting all Controls[], Decorations[], AllObjs[], as well read/write properties for its visibility, enabled state, caption, page description, etc.

My first guess is that the 'New VI Object' primitive could create a control and you could specify a Page as its owner's reference.

It's too late for me to try this right now. If you have trouble getting this to work, post back and I'll see what I can do.

Best regards,

Dave

Share this post


Link to post
Share on other sites

QUOTE (David Boyd @ Mar 3 2005, 11:02 AM)

I haven't tried this, but the Tab Control reference has a property called Pages[], and methods called Add Page, Dup Page, and Remove Page.

A Page reference has properties for getting all Controls[], Decorations[], AllObjs[], as well read/write properties for its visibility, enabled state, caption, page description, etc.

My first guess is that the 'New VI Object' primitive could create a control and you could specify a Page as its owner's reference.

It's too late for me to try this right now. If you have trouble getting this to work, post back and I'll see what I can do.

Best regards,

Dave

Page addition option was not available in Methods of the Pages[].

Share this post


Link to post
Share on other sites

QUOTE (jeffwass @ Mar 2 2005, 08:10 PM)

Does anybody know how to add new controls to a tab pane? I am working on a test-executive, and I'd like to have LabVIEW choose which graph to display, depending on what kind of data the user is taking. Ie, either chart or 2-D color graph, etc.

Also anybody know how to add/delete tab panes dynamically? There don't seem to be these options w/ the properties/methods of the tab. thanks.

I don't think you can dynamically add/remove pages on a tab control.

However, you can create as much pages as you'll need a edit time and then at run time choose which of these are visible ; that would also do the trick for the data type : instead of creating the desired type of graph dynamically (which I think is not possible) just select and display the appropriate tab.

Hope this helps.

QUOTE

I haven't tried this, but the Tab Control reference has a property called Pages[], and methods called Add Page, Dup Page, and Remove Page.

I have scripting enabled but I never saw these methods for Pages[] :blink:

Could you post a screen-shot of that ?

Share this post


Link to post
Share on other sites

QUOTE (jeffwass @ Mar 2 2005, 02:10 PM)

Does anybody know how to add new controls to a tab pane? I am working on a test-executive, and I'd like to have LabVIEW choose which graph to display, depending on what kind of data the user is taking. Ie, either chart or 2-D color graph, etc.

Also anybody know how to add/delete tab panes dynamically? There don't seem to be these options w/ the properties/methods of the tab. thanks.

A sub-panel can be used to make a tab page adapt to chaning req's. Just load the req'd FP into the sub-panel. No scripting required.

Ben

Share this post


Link to post
Share on other sites

Add a page is a method on the Tab control, not on the Page. As has been mentioned before, you can't add a page to a tab control on a running VI. There is an extreme hack that I actually implemented once. Create a main VI with a subpanel. Dynamically create a tab control with a subpanel on each tab. Load the code for each tab dynamically into the subpanels. When you need a new tab, create a new tab control with the correct number of tabs and subpanels. Without stopping them, load the code into the new tab control and populate the new tab. Then exchange the new tab for the old in the top level subpanel. If done correctly, it is seamless to the user.

I do not recommend doing this. It is far easier to create the maximum number of tabs you will need and hide them when you don't need them. I ended up using an entirely different GUI for the above system, and it worked much better (it was a simple subpanel with a tree control selector).

Share this post


Link to post
Share on other sites

QUOTE (normandinf @ Dec 17 2008, 04:10 AM)

Is it possible to have a number of tab pages enabled simultaneouly, and then programmatically bring any one of then to the front?

Regards,

GraemeJ

Share this post


Link to post
Share on other sites

QUOTE (GraemeJ @ Dec 16 2008, 06:22 PM)

Is it possible to have a number of tab pages enabled simultaneouly, and then programmatically bring any one of then to the front?

Regards,

GraemeJ

I'm not sure what you mean by "enabled simultaneously".

You can select the page to display simply by turning your Tab Icon into an indicator, or setting "Value" property to desired page if it's a control.

Share this post


Link to post
Share on other sites

QUOTE (normandinf @ Dec 17 2008, 12:49 PM)

setting "Value" property to desired page if it's a control.

Thanks. Got lost trying to work this out.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.