Jump to content
monzue

A good GUI architecture for Displaying multiple VI panels.

Recommended Posts

My Main reason for posting is that I too am wondering what is the best architecture for displaying status of multiple instruments. I am developing for 3 instruments with it being very probable that i will expand to 7-10 instruments. The User will run and control these instruments asynchronously and would like to see realtime status displayed on the GUI.

There is the possibility that there could be some instruments used sometimes, and then other times other instruments are used. What I would like to do is let the user select which instrument Panels are displayed in the Front Panel and allow rearranging of these panels. How can I do this? I would have a variable size front Panel for each Instrument. I thought about using subpanels, but Can they be programatically created? I think that they can be programatically resized. I thought about having a stack of Subpanels off to the side and I could grab them, resize, position, and populate the instrument FP as needed. Also I was thinking that it would be nice to allow the user to rearrange the instrument panels onscreen as needed. I was going to make each instrument its own class and somehow relate the Instrument FP to the class if that made sense. I didn't want to make a pop up window for each FP. And I could probably do this easily with an array of Subpanels, but my problem is that each FP could be a different size.

Is this a good Idea, or am I going down a bad path here?

Share this post


Link to post
Share on other sites

I thought about using subpanels, but Can they be programatically created? I think that they can be programatically resized.

No control can be programmatically created in LabVIEW at runtime. Controls can be moved, resized, made visible, etc.

[snip]

Is this a good Idea, or am I going down a bad path here?

What you're trying to do is challenging. The subpanels sounds promising. I'm not sure how feasible it is to drag them about as they do not natively have a title bar that windows do. Somewhere around is some code to make a VI a child window; that sounds more like what you're trying. I've never attempted to create a child window and not looked at the code, so I'm not sure how challenging that may be.

Tim

Share this post


Link to post
Share on other sites

Take a look at the actor framework. It is very well suited to what you want to do, and is probably an ideal solution.

~Jon

Share this post


Link to post
Share on other sites

Take a look at the actor framework. It is very well suited to what you want to do, and is probably an ideal solution.

~Jon

One more thing, moving of subpanels/customization is very difficult. you CAN do what you want to do, but it'll be a pretty massive effort. the best example of how to do this was done by jack Dunway during a coding challenge from a few years back. It was called the "Cogniscent UI" or something similar. It allows the run time user to re-size the subpanels and re-position them at runtime in a very elegant way. At any rate, you should check it out because it is just awesome labview.

Share this post


Link to post
Share on other sites

One more thing, moving of subpanels/customization is very difficult. you CAN do what you want to do, but it'll be a pretty massive effort. the best example of how to do this was done by jack Dunway during a coding challenge from a few years back. It was called the "Cogniscent UI" or something similar. It allows the run time user to re-size the subpanels and re-position them at runtime in a very elegant way. At any rate, you should check it out because it is just awesome labview.

Close, but no cigar ;) It's the CognoscentUI.

Share this post


Link to post
Share on other sites

I agree, The cognoscentUI is great, Thanks for pointing that out. I spent some time today playing around with it and It seems to be exactly what i was talking about. The demo program has only one X-control, but I was able to Duplicate it easily enough. Now, what I need to learn is the Module Class to see how I could create and load in an instrument Module, based on the instruments class.

I also played around some with subpanels, and they are easy enough to manipulate.

The problem that i am still thinking about is how to have an arbitrary Number of Xcontrols or Subpanels. Do I have a stack of them that are empty off to the side and Move them into position as the User Wants to see a panel?

How else could I do this?

Share this post


Link to post
Share on other sites

multiple subpanels "off to the side" or hidden is a reasonable approach. The alternative is to dynamically launch new front panels (they wont be in the same window then) Which ever one you like the look/feel of can dictate what you do.

~Jon

Share this post


Link to post
Share on other sites

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.