LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controls created in front panel at runtime in labview

I need to create a controls in a front panel dynamically at run time in labview
0 Kudos
Message 1 of 3
(2,210 Views)
There is no easy way to do this.
The simplest way is using an array and controlling the number of visible elements, but in an array all controls have the same appearence and you can't control their positions.
You can also use a picture control, with the Get Control Image Method and mouse down events, to simulate control, but this isn't easy either.
If you have a maximum number of controls, you can create them off screen, and use their proerty nodes to make them appear and disappear.
lastly, you can use what's known as VI scripting, but this is more advanced stuff and isn't supported by NI.

___________________
Try to take over the world!
Message 2 of 3
(2,206 Views)
Another option would be to look into sub panels. This is basically embedding the front panel of a subVI in the top level VI. Setting up subVIs with the different configurations you need, and then call the one you want into the sub panel.

Once a VI is running, there is no way to actually add/delete anything from the front panel or block diagram. Not even the scripting features will let you do this. They will let you dynamically place controls on another VI as long as the one being modified isn't running or reserved for running. So that might be something to look into.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 3
(2,201 Views)