I'd like to see an example of how to programmatically generate a new front panel object like a button or sub-panel at run time. Any pointers?
I've looked for examples but don't seem to be having success.
Hi,
Actually you can't ! LabVIEW doesn't allow dynamic control creation. It must know how many controls needs to be loaded at run-time.
There is a trick where you can use subPanel and re-entrant VIs but this is not really dynamic.
Also if you don't plan to compile your VI you might be interested in VI Scripting to dynamically create controls in VIs.
Regards,
Have a look at this thread : https://forums.ni.com/t5/LabVIEW/How-can-I-dynamically-quot-create-quot-controls-or-indicators/td-p/...
"Controls on the fly" (artwork courtisy of Christian Altenbach) is something I have done on more than one app.
Also check out the Picture control thread for more links and idea.
The easy method is to pre-create and hide.
The amount of code that goes into supporting functional controls is enormous (been ther done that)
Ben
@paul_a_cardinale wrote:
Try this.
This is great, thank zou very much! This is exactly what I needed for a labview code generator!