06-17-2021 05:05 AM
Hi!
In an attempt to limit the number of pop-up windows for an application I'm developping, I'm trying to use a single Sub-panel that will either show the "main screen" or display sub-vi's front panels (like settings, parameters, status etc.)
I enclose a very simple to illustrate my situation with a small main interface running a dummy graph and a dummy status window under the main application. I'm using notifiers to close the two sub-vis (In my application I am using queues and notifications in the same principle than here)
There are 2 things that are bothering me/I'm struggling with.
I hope I was clear, thank you in advance for you help.
Vinny.
06-17-2021 07:30 AM
I haven't checked your code yet, but it might be worth searching for information about "Splitter Panes" - these allow you to partition your front panel into chunks, and then you can more easily have LabVIEW autoscale bits (if you already demonstrated this in your code, sorry!)
There are also some dynamic sizing VIs in the "Hidden Gems" package (search VIPM), but I haven't tried using them and don't know if they're appropriate here or not...
06-17-2021 07:57 AM
So I've already tried using splitters for my buttons at the bottom in a failed attempt to alway keep them bottom-centered:
This is the minimum-sized window and it looks fine
As soon as the window gets wider, the buttons are not centered anymore
I understand that you meant using splitters on my Status.vi front panel, right? But already in my main i'm struggling to keep something centered...
Parameters for my bottom vertical splitters:
Left: Splitter sticks right
Right: Splitter sizes proportionally
I've never used specifically packages from VIPM yet (apart from drivers), might be a good opportunity to try.
06-17-2021 09:03 AM - edited 06-17-2021 09:12 AM
I could not run your code because a TypeDef (Coms Status) was missing. But a possible "fix" for your problem is to set the Window Run-Time Position property of the VI you want to run in the Sub-Panel as "Centered" (instead of "unchanged"). You should also set the VI you want to display so that it fills its SubPanel (which you've done).
Bob Schor
P.S. -- speaking of VIPM, the OpenG Toolkit includes the Application Control VIs that has "Fit Window to Largest Decoration", which I use for all my sub-Panel VIs. I wrap a Box or a Frame around the part I want to see in the Window, put this function as the first one in my VI, run it to size things, then save the VI, properly sized. If things "move a bit" during subsequent editing, I can always "manually resize" it by simply hand-running it again.
06-18-2021 02:58 AM
Hi Bob,
@Bob_Schor a écrit :
I could not run your code because a TypeDef (Coms Status) was missing.
My bad, I thought I've disconnected it. Anyway here it is, also saved in LV19 this time.
@Bob_Schor a écrit :
a possible "fix" for your problem is to set the Window Run-Time Position property of the VI you want to run in the Sub-Panel as "Centered" (instead of "unchanged").
...
P.S. -- speaking of VIPM, the OpenG Toolkit includes the Application Control VIs that has "Fit Window to Largest Decoration", which I use for all my sub-Panel VIs. I wrap a Box or a Frame around the part I want to see in the Window, put this function as the first one in my VI, run it to size things, then save the VI, properly sized. If things "move a bit" during subsequent editing, I can always "manually resize" it by simply hand-running it again.
I'll give these a try thanks!
Would you mind running my code and tell me what happens when you display the graph with the window maxed on your screen?
I'm curious (and concerned) about this lag I'm having.
THanks.
Vinny
06-18-2021 07:11 PM
If I just run your main routine and press no buttons, I get this:
If I push "Status", I get Error 1144, cannot insert sub-panel because already open (I think it means Status is already open). I didn't investigate more. I don't usually use Notifiers, so I didn't try to understand what you were doing with them -- I suspect there's a much easier way to do what you are trying to do.
Bob Schor
06-21-2021 02:56 AM
Hmmm have you closed the other VIs? (The main manages all the executions and the two other VIs must be closed to be placed in the subpanel)
I haven't done any error management as it was really just an illustration for UI stuff.
@Bob_Schor a écrit :
I don't usually use Notifiers, so I didn't try to understand what you were doing with them -- I suspect there's a much easier way to do what you are trying to do.
Bob Schor
I'm just using the notifiers to wait for the subvis (status and graph) to exit their loop before closing the main (and closing the references) as I'm running them in call and forget.
I'm pretty sure there is an easier way! Again, just a quick example.
Have you encountered any lag in the update of the graph (checking the X axis) when maxed out on your screen?
Vinny.