ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Subpanels and temporary overlays

I want to create a VI that sometimes (temporarily) displays a sort of pull-out menu across the top of the front panel, and the rest of the time uses this space for other things.

 

I initially wrote this using a subpanel that I placed on the top (in Z) and then changed the Visible property as required. That worked fine.

 

Now I wanted to split the front panel into various areas to place graphs, and figured splitters allow me to have reasonable-ish autoresizing capabilities in LabVIEW.

 

I proceeded to add splitters in the following manner:

  1. Horizontal at the bottom, for a status bar
  2. Vertical in the middle, to split left and right. The right side has one graph.
  3. Horizontal on the left, with 2 more graphs.

The intention was to have the subpanel appear above the top, but of course the Subpanel has to belong to a pane, and with splitter 2, I can't place it across the entire top.

 

To work around this, I added a second horizontal splitter between steps 1 and 2, at the top, and am now attempting to manipulate the position depending on the visibility of the top panel.

(This changes the behaviour, in a not really desirable but acceptable way - previously the overlay was an overlay, now it will resize the middle area and shrink the graphs, but that's ok...)

I'm having a couple of problems:

  • I don't know what value of Splitter Position to set to get a nice size. Previously I calculated this based on the Pane Bounds of the main VI, I can still do this, but it seems to be behaving strangely.
  • I don't know when to set this - I keep getting error 1358 - violation of a minimum/maximum size of a descendent pane. As far as I can tell, none of the VIs have a minimum size.
  • I always have a splitter at the top (although perhaps I could make it invisible). This loses some space and doesn't look as nice.

 

What's the best way to go about this? I expect I'm doing something silly, but I don't see an obviously better way...

Can I place a subpanel across multiple panes? Or do I need the (horizontal) splitter shown here (that's my understanding, but worth asking maybe).

Is there a better method to deal with this?

Perhaps a subpanel for the Graph area, and then having overlapping subpanels, no splitters except the bottom for the status bar, and having the splitters in the subVI with the graphs...?

It's likely the graphs will be populated using VI Server references anyway, especially the larger graph to the right (the two on the left might be directly wired, depending on how I set it up, and will have more data points at any given time).

 

cbutcher_0-1635490948621.png

 


GCentral
0 Kudos
Message 1 of 4
(1,526 Views)

@cbutcher wrote:

Perhaps a subpanel for the Graph area, and then having overlapping subpanels, no splitters except the bottom for the status bar, and having the splitters in the subVI with the graphs...?

 


This is my new plan. Perhaps an Actor for the graph populating, and it can place a VI (maybe Actor Core, often a convenient choice) in the subpanel passed by the calling Actor. Tight coupling not too problematic here.

 

Will also look at the various frameworks regarding 'dynamic'-esq panels and graphs, I remember a few presentations vaguely.

 

So new question - which frameworks of that type have you used and liked/disliked? Any recommendations?


GCentral
0 Kudos
Message 2 of 4
(1,494 Views)

You can also put all the splitted elements in a VI in a subpanel, and display the popup in a 2nd subpanel.

 

I made the dynamic scaling library to do all this (flexible, dynamic, add hoc splitters\panes), because frankly LV's native GUI system is pretty much 15 years behind.

 

There are some known (to me 🙄) issues with the library, but you know where to find me if you can't fix them 😊. IIRC, the online version doesn't work in executables OOtB, because the main loop's FP is removed, because an event structure in a disabled case doesn't keep the FP in an exe anymore (since somewhere between 13 and 18)

Message 3 of 4
(1,479 Views)

Check out this demo for collapsible splitters, maybe it will be of use to you.

 

One other thought: if it's not required to be able to see all three graphs at once, you could dramatically decrease FP size by putting each graph in a separate page in a tab structure, and the user could cycle through them when needed.

Redhawk
Test Engineer at Moog Inc.

Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.

Message 4 of 4
(1,462 Views)