02-20-2012 01:06 AM
Hello everybody,
Do you know how to add control or indicator at run-time? I'm using LV 8.2.
Thank you.
02-20-2012 02:30 AM
Hi yoppy,
you cannot add controls at runtime. Point.
But you can:
- make predefined controls visible (by property node)
- move predefined controls to visible pane (by property node)
- use arrays of controls
- use a fixed amount of controls, but assign their values to different "storages" aka "variables"
02-20-2012 02:59 AM
You can check for the example at this link.
You can dynamically create controls (which you pre-defined) and assign them to the parameters you are interested in.
I will attach the sample code.....check it out.
02-20-2012 03:20 AM
@Fragger Fox: Thanks for your code. But unfortunately, it's in LV ver 9.1. Mine is 8.2. Would you please convert it?
Thanks in advance.
02-20-2012 03:50 AM
Here you go...
02-20-2012 05:10 AM
02-20-2012 09:33 AM
@Fragger Fox wrote:
You can check for the example at this link.
You can dynamically create controls (which you pre-defined) and assign them to the parameters you are interested in.
I will attach the sample code.....check it out.
That's not really dynamically creating controls. It's simply opening VIs and moving them so the window relationship is set through the Windows API. For one thing, it's not portable, as it's Windows-only. Also, the control has no relationship to the "parent" VI.
02-20-2012 10:11 AM
I did this with a picture control. It's in LV 8.2.
02-20-2012 09:17 PM - edited 02-20-2012 09:23 PM
Thank you Fragger Fox abundantly.. I wonder how I can set and get values from the created controls.For example, I type on String control, and I want to catch the value on the string control.
Also, can I create more than one same controls, for example 3 controls of string.
Thank you.
02-20-2012 11:44 PM
@yoppy wrote:
Also, can I create more than one same controls, for example 3 controls of string.
Yes, you can create multiple controls. You can make the control VIs re-entrant and launch multiple controls