Jump to content

Can I interact with VI in sub-pannel in XControl?


Recommended Posts

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

Link to comment

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

Link to comment

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.

Link to comment

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

Link to comment

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.

Link to comment

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

Link to comment

Join the conversation

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

Guest
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.