07-23-2005 11:02 AM
07-23-2005 11:16 AM
07-23-2005 11:32 AM - edited 07-23-2005 11:32 AM
You can show or hide individual tab pages, disable them, etc.
Attached is a simple demo to show/hide a page via a boolean control (LabVIEW 7.1).
Message Edited by altenbach on 07-23-2005 09:40 AM
07-23-2005 12:52 PM
As the others have pointed out you can't add tabs while a program is running. If you think about it, how many programs have you seen that have an interface where users can add tabs. In fact I would say that the number of tab control in all applications is dropping because they take up a ton of room on a screen and IMHO get dificult to manage after more than 1 row. What is it that you are trying to accomplish interface-wise? There are many other control structures that are "exandable" (tree controls, pop-up menus, menu-bar menus, list boxes, etc.) you just have to find the one that makes sense for your interface.
Mike...
07-27-2006 01:32 AM
07-27-2006 01:47 AM
So, what would be the use?
Even if you could add a new tab and a new graph or control on it at runtime, it would not be connected to any code... pretty useless.
Can you explain why you think you need this. Any practical example?
Don't you think that the method in my example above is entirely sufficient?
07-27-2006 03:14 AM
07-27-2006 07:53 AM
Dynamic GUI object creation?
ANYTHING can be done using the picture control.
http://forums.ni.com/ni/board/message?board.id=BreakPoint&message.id=14&jump=true
NOTE:
"ANYTHING" will take more time to develop than hiding and show pages.
Ben
07-27-2006 08:00 AM
Lesson to learn:
Dynamic GUI object creation (1) != Dynamic GUI object creation (2)
1: Create a defined object dynamically due to specific conditions
2: Create a "freestyle" front panel object programatically
Definitely two possible topics... 😉
07-27-2006 09:41 AM - edited 07-27-2006 09:41 AM
I came up with a "solution" to being able to dynamically creating objects in LabVIEW (note the quotation marks). It's a clever use of subpanels. My approach - and I don't really recommend this, but's it's interesting at least - was to create a linked object list. A linked list in general is a data structure that contains the element itself and a link to the next element. My idea was to twist this around to being a control or indicator and a subpanel to host the next object (which has a control or indicator and a subpanel, etc.). This allows dynamic generation of any number of objects in any combination that can all send or receive data to a root-level host VI. The root VI is also in charge of dynamically creating or destroying objects. In my case I used an XControl to control everything. I posted the example online at the community forums here. Take a look!
A couple things to note: this won't allow you to create multiple tabs directly, but you might cleverly be able to create things that look like tabs and use subpanels for the tab "pages" (I don't think this post can take any more quotes 🙂 ). Second, my approach is 1D, where the controls expand to the right, but this could be expanded to include a full 2D topology.
And sorry folks, due to the XControl-ness of it all, this is LV 8 only. Honestly, Ben's picture control approach might be much easier than this. Enjoy!
(Also note if you download the example to run it with the included project file open)
Message Edited by Jarrod S. on 07-27-2006 09:43 AM