ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
10-29-2021 02:07 AM
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:
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:
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).
10-29-2021 03:18 AM
@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?
10-29-2021 06:00 AM
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)
10-29-2021 08:54 AM
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.
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.