jeffwass Posted March 2, 2005 Report Share Posted March 2, 2005 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. Quote Link to comment
regisphilbin Posted March 2, 2005 Report Share Posted March 2, 2005 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? Quote Link to comment
David Boyd Posted March 3, 2005 Report Share Posted March 3, 2005 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 Quote Link to comment
neo_zion Posted December 17, 2008 Report Share Posted December 17, 2008 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[]. Quote Link to comment
Antoine Chalons Posted December 17, 2008 Report Share Posted December 17, 2008 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[] Could you post a screen-shot of that ? Quote Link to comment
Francois Normandin Posted December 17, 2008 Report Share Posted December 17, 2008 Hi Antoine, You don't require scripting for these properties. Quote Link to comment
LAVA 1.0 Content Posted December 17, 2008 Report Share Posted December 17, 2008 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 Quote Link to comment
Antoine Chalons Posted December 17, 2008 Report Share Posted December 17, 2008 QUOTE (normandinf @ Dec 16 2008, 03:30 PM) Hi Antoine, You don't require scripting for these properties. I was talking about methods for Pages[]. The only methods for I have for a Page are these : http://lavag.org/old_files/monthly_12_2008/post-7452-1229438690.png' target="_blank"> Quote Link to comment
DFGray Posted December 17, 2008 Report Share Posted December 17, 2008 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). Quote Link to comment
Francois Normandin Posted December 17, 2008 Report Share Posted December 17, 2008 QUOTE (Antoine Châlons @ Dec 16 2008, 09:45 AM) I was talking about methods for Pages[].The only methods for I have for a Page are these : Sorry... I get some more methods from the Scripting Workbench: (But not much really...) Quote Link to comment
GraemeJ Posted December 17, 2008 Report Share Posted December 17, 2008 QUOTE (normandinf @ Dec 17 2008, 04:10 AM) Sorry... I get some more methods from the Scripting Workbench: (But not much really...) http://lavag.org/old_files/monthly_12_2008/post-10515-1229447380.png' target="_blank"> 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 Quote Link to comment
Francois Normandin Posted December 18, 2008 Report Share Posted December 18, 2008 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. Quote Link to comment
GraemeJ Posted December 18, 2008 Report Share Posted December 18, 2008 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.