LAVA 1.0 Content Posted January 5, 2008 Report Share Posted January 5, 2008 Background Info: I have been playing with code to support "Docking" and "Un-Docking" parts of my GUI's. In this context the terms "Docking" and "Un-Docking" refer to being able to take take part of my screen (a tab page for examle) and opening it in a floating window that the user can re-size and position as they choose. The method I am using is nothing new. When "Docked" a FP is shown in a sub-panel. When it is "Un-Docked" I remove it from the sub-panel and show the FP. The VI's that run in the sub-panels (have not been written yet, but ) will have to interact with the rest of my app using queues, AE's (LV2's) etc. And since this will be re-used many times in various app's I was concidering developing an XControl to handle the work of Docking and Un-Docking. BUT....there is some fine print for the XControl that says something about the XControl running in a different context and I can't talk to it using queues, etc. Question: Is it possible to develop an XControl to which I can pass a reference for a VI that can control the Docking of the VI? If yes, please share. Thank you, Ben Quote Link to comment
Ton Plomp Posted January 5, 2008 Report Share Posted January 5, 2008 There goes one saturday night. I've once written something like that (I assume). Hopefully it can give you any pointers. Ton Man it was hard to find. Quote Link to comment
LAVA 1.0 Content Posted January 5, 2008 Author Report Share Posted January 5, 2008 QUOTE(tcplomp @ Jan 4 2008, 04:24 PM) There goes one saturday night.I've http://forums.lavag.org/XControls-as-ChildWindows-t7205.html&p=27182' target="_blank">once written something like that (I assume). Hopefully it can give you any pointers. Ton Man it was hard to find. Thanks Ton! I'll look at it this wek-end. BTW: I asked NI this Q before posting and they could not answer it. I told them, send me an e-mail and I'll send them a link to my Q on LAVA. At the same time I said "Ton probably knows." Ben Quote Link to comment
ragglefrock Posted January 6, 2008 Report Share Posted January 6, 2008 QUOTE(neB @ Jan 4 2008, 02:31 PM) Background Info:I have been playing with code to support "Docking" and "Un-Docking" parts of my GUI's. In this context the terms "Docking" and "Un-Docking" refer to being able to take take part of my screen (a tab page for examle) and opening it in a floating window that the user can re-size and position as they choose. The method I am using is nothing new. When "Docked" a FP is shown in a sub-panel. When it is "Un-Docked" I remove it from the sub-panel and show the FP. The VI's that run in the sub-panels (have not been written yet, but ) will have to interact with the rest of my app using queues, AE's (LV2's) etc. And since this will be re-used many times in various app's I was concidering developing an XControl to handle the work of Docking and Un-Docking. BUT....there is some fine print for the XControl that says something about the XControl running in a different context and I can't talk to it using queues, etc. Question: Is it possible to develop an XControl to which I can pass a reference for a VI that can control the Docking of the VI? If yes, please share. Thank you, Ben You could use your action engine to abstract away the fact that you're using tcp to transmit the data to the subvi. Quote Link to comment
LAVA 1.0 Content Posted January 6, 2008 Author Report Share Posted January 6, 2008 QUOTE(ragglefrock @ Jan 5 2008, 12:40 AM) You could use your action engine to abstract away the fact that you're using tcp to transmit the data to the subvi. I was concidering the same thing while drink my coffee this AM but then reconcidered. Yes it would work but it would but a restrction on the code that runs in the sub-panel. THe code running in the sub-panel would have to use VI server calls that I could wrap in an AE. But that would mean the sub-panel code would have to be written to run in the sub-panel. I was hoping for an implementation that did not put restriction on the sub-panel code. Ton, If the Steelers weren't playing, I'd be "wasting" this Saturday night studying your code. Thank you very much! Ben Quote Link to comment
Yair Posted January 6, 2008 Report Share Posted January 6, 2008 If you don't mind platform dependence, you can call the reparenting functions in Windows to actually move the window into your front panel, but you should note that this comes with its own set of problems. Searching for MDI here and in the NI forums should show some examples. Quote Link to comment
LAVA 1.0 Content Posted January 6, 2008 Author Report Share Posted January 6, 2008 QUOTE(Yen @ Jan 5 2008, 01:11 PM) If you don't mind platform dependence, you can call the reparenting functions in Windows to actually move the window into your front panel, but you should note that this comes with its own set of problems. Searching for MDI here and in the NI forums should show some examples. I just tried out Tons example and the VI running in his sub-panel seems to be able to "see" an AE just fine. I have to look closer! Ben 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.