Jump to content

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.

Link to comment
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?

Link to comment
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

Link to comment
  • 3 years later...

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[].

Link to comment

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 ?

Link to comment

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

Link to comment

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).

Link to comment

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.

Link to comment

Join the conversation

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

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

×
×
  • Create New...

Important Information

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