09-21-2017 05:14 AM - edited 09-21-2017 05:17 AM
Hello Carya,
Can i dynamically call a subpanel?
because i would like to call uncertain amount of control during run time
the reason i use vi as child window because i cannot dynamically call the control (the control must be created before running the program)
by using child window concept, not only i can create any amount of control on demnand, I also can move the control freely, which is what i need(because i may need to focus on certain test cell during presentation)
09-21-2017 05:25 AM - edited 09-21-2017 05:26 AM
also notice that in the last video i post, there is another abnormality
when i call the subvi and set it as child window, it front panel dissapear
i have to "dip" it in the parent window border to recover the front panel
how ever this will not happend if i hide the window title bar first
09-21-2017 05:29 AM
>subvi and set it as child window
LabVIEW does not have child windows. Use a SubPanel.
09-21-2017 05:33 AM
Hello Carya,
what do you mean by this?
as far as i know, you can set vi window as child window of another another vi window using user32dll as shown in my last video
09-21-2017 05:36 AM
Like this.
09-21-2017 05:43 AM
@coloredsound wrote:
Hello Carya,
as far as i know, you can set vi window as child window of another another vi window using user32dll as shown in my last video
LabVIEW is not mend to do stuff like that. You can do stuff like that, but you'd be swimming against the flow. It will not do you any good.
Have I mentioned already that SubPanels is what you want?
09-21-2017 05:47 AM
Hello Carya,
Thank you for the code, this seem to be working
is it possible that i dynamically create the subpanel, on demand?
because as far as i understand, the subpanel is also a type of control and control cannot be dynamically created
09-21-2017 05:54 AM
@coloredsound wrote:
Hello Carya,
Thank you for the code, this seem to be working
is it possible that i dynamically create the subpanel, on demand?
because as far as i understand, the subpanel is also a type of control and control cannot be dynamically created
You are right, you can't dynamically create them.
However, if you must do it dynamically, you can create 1700 (I tested this with 1700 but that number is random) of them and show\hide\move them at will. 1700 will be your maximum but that might be enough. If not, maybe 3000? There should be very little overhead, subpanels are very efficient. It might very well be more efficient then 1700 sub VI's on top of a main VI.
BTW: XControls might also help, but I'm no fan.
09-21-2017 06:09 AM - edited 09-21-2017 06:10 AM
Hello Carya,
thank you for your advice
09-21-2017 06:19 AM
@coloredsound wrote:
Hello Carya,
thank you for your advice
Please accept an answer, or formulate your answer so you can accept it. Keep the forum clean.