Jump to content

Research the reference window of subpanel


Recommended Posts


My issue is the following:
I created a dynamic VI where the user creates his own interface
he inserts indications and commands that it needs knowing that we can move them during the execution of the vi (function integrated in the program)

When I call this VI using a subpanel, my indicators take the reference of the window of windows and not of the window of the subpanel.

Do you have a solution to have everything in the subpanel?
Or a solution to execute the vi in a restrictive zone of the Front Panel

Thank you in advance



Edited by Nicolas_L
Link to post

Can we see some code? How moving around the controls is handled? Is it some sort of drag and drop? Is it handled by LV or by Windows API?

Also, is the VI in the supbanel running? I wouldn't know if it is possible at all to add a control to a running VI with LV scripting.

Link to post

Yeah if this is using a Windows API with Parent/Child relationships you will run into issues.  When using a subpanel there is no HWnd for the inserted VI only for the VI that has the subpanel.  More information is needed.

Link to post

Yeah don't use them with Subpanels.  Either go all out with the Windows API abandoning subpanels, or use subpanels exclusively.  I threw a quick example of the Windows only route here showing a somewhat unlimited way of spawning windows.  As for a subpanel only route I have the Image Grid, which is subpanels of subpanels.

  • Like 1
Link to post
9 hours ago, Nicolas_L said:

Hello ShaunR

I studied your solution 
But I would like to have the principle as in the picture below
And in flexibility zone, we displace indicators and orders

Well. An area to place them is trivial.


As for "we displace indicators and orders". I'm not sure what you mean. You can rearrange the window order, move them around, tile and cascade them, dock and undock. But you'd have to give more detail on exactly what you mean.

Link to post
1 hour ago, Nicolas_L said:


Currently my program has a same behavior as MDI Toolkit in the movement of "child"

And I research a solution to creat a limited area as I did in the last explication.
How do you creat this limited area?

The MDI toolkit uses a "container" to place the panels. In the example which is shipped with the toolkit there is also a limited area (below the controls) however it is transparent. The container area is defined by the "Create Container" VI.


You required a more visible container. So one simply creates a VI with the required appearance and supplies the "Container" input of the "Create Container" VI with the VI reference.


I used the attached VI to override the default container which is just a blank VI with a decoration.

Untitled 2.vi

Don't forget to also change the offset rect for the resize event otherwise when you resize the panel, it wont scale along with the panel.


Edited by ShaunR
Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.