取消
显示结果 
搜索替代 
您的意思是: 

Programmatically generate a new front panel object

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.

0 项奖励
1 条消息(共 6 条)
5,598 次查看

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,

Da Helmut
Voir le profil de Maxime M. sur LinkedIn - View Maxime M.'s profile on LinkedIn
0 项奖励
2 条消息(共 6 条)
5,589 次查看
3 条消息(共 6 条)
5,583 次查看

"Controls on the fly" (artwork courtisy of Christian Altenbach) is something I have done on more than one app.

 

ControlsOnThe Fly.png

 

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 项奖励
4 条消息(共 6 条)
5,540 次查看
5 条消息(共 6 条)
5,510 次查看

 


@paul_a_cardinale wrote:

Try this.


This is great, thank zou very much! This is exactly what I needed for a labview code generator!

0 项奖励
6 条消息(共 6 条)
5,104 次查看