Jump to content
Nicolas_L

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

Share this post


Link to post
Share on other sites

I'm not sure I understand the setup - do you have code you can post which shows what's going on, or images if you can't share code?

Share this post


Link to post
Share on other sites
6 hours ago, Nicolas_L said:

Or a solution to execute the vi in a restrictive zone of the Front Panel

MDI Toolkit for LabVIEW?

(shameless plug)

Edited by ShaunR
  • Like 1

Share this post


Link to post
Share on other sites

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

Capture1.PNG

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Yes I use a API Windows with Parent/Child relationships

Is there a solution to solve this problem?

Edited by Nicolas_L

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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.

Untitled.png

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.

Share this post


Link to post
Share on other sites

ShaunR

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?

Share this post


Link to post
Share on other sites
1 hour ago, Nicolas_L said:

ShaunR

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.

default.png

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.

modified.png

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.

resize.png

Edited by ShaunR

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

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