Nicolas_L Posted February 27, 2018 Report Share Posted February 27, 2018 (edited) 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 PanelThank you in advance Edited February 27, 2018 by Nicolas_L Quote Link to comment
Chris_Collier Posted February 27, 2018 Report Share Posted February 27, 2018 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? Quote Link to comment
ShaunR Posted February 27, 2018 Report Share Posted February 27, 2018 (edited) 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 February 27, 2018 by ShaunR 1 Quote Link to comment
Nicolas_L Posted February 28, 2018 Author Report Share Posted February 28, 2018 Hello Chris Here is images of problem The indicator behave an independent window Quote Link to comment
Nicolas_L Posted February 28, 2018 Author Report Share Posted February 28, 2018 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 Quote Link to comment
ensegre Posted February 28, 2018 Report Share Posted February 28, 2018 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. Quote Link to comment
hooovahh Posted February 28, 2018 Report Share Posted February 28, 2018 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. Quote Link to comment
Nicolas_L Posted February 28, 2018 Author Report Share Posted February 28, 2018 (edited) Yes I use a API Windows with Parent/Child relationships Is there a solution to solve this problem? Edited February 28, 2018 by Nicolas_L Quote Link to comment
hooovahh Posted February 28, 2018 Report Share Posted February 28, 2018 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. 1 Quote Link to comment
ShaunR Posted February 28, 2018 Report Share Posted February 28, 2018 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. Quote Link to comment
Nicolas_L Posted March 1, 2018 Author Report Share Posted March 1, 2018 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? Quote Link to comment
ShaunR Posted March 1, 2018 Report Share Posted March 1, 2018 (edited) 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. 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 March 1, 2018 by ShaunR Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.