UI Interest Group Discussions

Showing results for 
Search instead for 
Did you mean: 
Reply

Dock windows system in LabView

Highlighted

Dock windows system in LabView

A nice UI approach for complex applications is the use of docking windows. Take the example of Matlab, Visual Studio: you can have multiple floating windows, you can dock/detach them in the main application window, close them,... Some packages exist in .NET to fully and efficiently use this technique. Is there someone aware of an implementation of this approach in LabView? It could include integrating .NET or Windows tools.

Thanks.

Pierre Cottin

INO

0 Kudos
Message 1 of 12 (13,191 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

Not a framework, but you can find an example you can start with here:

http://forums.ni.com/ni/board/message?board.id=170&view=by_date_ascending&message.id=351512#M351512

(Edit - ignore that, the example doesn't do what I thought it does, although you can also show a "title bar" on the subpanel and use that to move it around using events).


Also, you can call the Windows API reparenting functions to place your windows inside each other (you can do a search for "MDI" to see some examples), but you should that LV might not play nicely with that.


___________________
Try to take over the world!
0 Kudos
Message 2 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

Hi, Pierre

You may want to take a look at an example that I posted that I think provides similar functionality to what you have described.

Snap To Panel

The Snap To Panel example provides the ability to control the position of one LabVIEW subpanel relative to another LabVIEW front panel (docking). The Snap To Panel example enables you to position the subpanel either outside or within the bounds of the main panel; however, when the subpanel is positioned within the bounds of the main panel, it does not actually become a part of the main panel.

Although the Snap To Panel example does not enable you to dock/detach subpanels within the main application window exactly as you described, it may be a good starting point for generating ideas for how to do what you want.

Thanks for posting and let us know how you ultimately solve this problem.

Mark Ridgley

0 Kudos
Message 3 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

Hi,

I have build a MDI for LabVIEW some years ago, it is a combination of Windows API calls to set VI's as a child of another VI. I have added a Subpanel as an owner to have more control of where the VI can be dragged too.See a screenshot below.

mdi example.JPG

With kind regards,

Arnoud de Kuijper

T&M Solutions BV

Message 4 of 12 (63 Views)

Re: Dock windows system in LabView

Hello, Arnoud

Thanks for posting your example. I like it.

Your example might also provide Pierre with some ideas for how to do what he would like to do.

I think that perhaps a solution that combines the functionality found in the examples the you and I posted would work nicely, although I do not have time to work on that at the moment. Perhaps Pierre will take our examples and use them to create this new solution.

By the way, I took a look at the T&M Solutions BV website -- it was really interesting and sounds like a very capable company.

Thanks again for posting.

Best Regards,

Mark Ridgley

0 Kudos
Message 5 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

Thanks Arnoud and Mark for your posts. These are good examples to start with. Any thought about using Windows API to have the same look and feel as regular windows app?

There is a nice example from Thoric (http://decibel.ni.com/content/docs/DOC-9946) showing what can be done with .NET objects. There are some .NET packages related to docking/floating windows (http://www.digitalrune.com/Products/DockingWindows/Overview.aspx) it would be great to be able to reuse them.

Pierre

0 Kudos
Message 6 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

Hi, Pierre

I came across another example that is similar to what you want to do. Take a look at Show a front panel in a Windows app?.

I think that any of the examples posted here, in the thread that I referenced above or the ones that you mentioned in your last post should give you a good starting point for what you want to do.

These examples all show that what you want to do is possible and also that there are several methods to achieve it. In my opinion, the key lies in selecting a method that best fits your particular application and that you are comfortable with implementing.

Please post back to let us know how you ultimately decide to do this.

Thanks for posting.

0 Kudos
Message 7 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

I am also facing the same issue - is it possible to open multiple instances of same main_MDI_system.vi.

0 Kudos
Message 8 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

I modified Arnoud's example a bit.  This version is in LabVIEW 2012.  The main improvement is that it accounts for window menu bar/tool bar, etc...  (In Arnouds example he made assumptions about the menu bars presense the lack of toolbar and the absolute pixels of them) .  Rest of the changes are mostly block diagram cosmetics.

0 Kudos
Message 9 of 12 (63 Views)
Reply
0 Kudos

Re: Dock windows system in LabView

I don't know if you are still looking for something like this. I have been using Saphir's XTab control. It provides a Chrome like tab control, where you can detach the different tabs and have them float as individual windows or bring them back to the original tab control.

You can download it by going to VIPM and searching saphir or going to the product page in the Tools network: http://sine.ni.com/nips/cds/view/p/lang/en/nid/210715

Certified LabVIEW Architect * Certified Professional Instructor * LabVIEW Champion
Message 10 of 12 (63 Views)