04-10-2024 01:06 PM
I've been toying with an idea for a long time, which is: given a M*N array of references to a reentrant VI with the same FP dimensions (M,N, and VI unknown at compile time), can I create a "grid" of them in subpanels? I know I can't create an array of subpanels, but maybe I could create reentrant VIs with a 2*1 arrangement and a 1*2 arrangement and recursively nest them such that I can get M*N? And then have them arrange themselves based on the dimensions of the reentrant VI I actually want to show?
Has anyone tried something like this and it didn't work? Or better yet an open source implementation? I can tell it will be a hassle to get a working prototype...
Solved! Go to Solution.
04-10-2024 01:25 PM
This sounds like something where the Actor Framework would be well-suited. I've seen a UI demo that might give you some ideas. I haven't spent the time trying to understand it myself.
https://forums.ni.com/t5/UI-Interest-Group-Documents/Windows-8-Style-UI-demo/ta-p/3496737
04-10-2024 01:47 PM
Out of curiosity, what are you trying to accomplish with this?
If you have a specific purpose in mind besides "wouldn't this be cool", then it would be easier to assess viability or provide alternative suggestions.
04-10-2024 02:01 PM - edited 04-10-2024 02:04 PM
@Kyle97330 wrote:
Out of curiosity, what are you trying to accomplish with this?
If you have a specific purpose in mind besides "wouldn't this be cool", then it would be easier to assess viability or provide alternative suggestions.
Given a M*N array of references to a reentrant VI with the same FP dimensions (M,N, and VI unknown at compile time), I would like to display a grid of the reentrant VIs that arrange themselves. Ideally this will become a reusable code module for my organization's common framework.
edit: I'm just asking if anyone has done this, you don't have to solve some other problem you think I'm "really" asking
04-10-2024 03:06 PM
The "Subpanel Layouts" I show in this talk are similar to what you are asking: https://forums.ni.com/t5/JDP-Science-Tools/UI-talk-at-GDevCon3/td-p/4254642
I've used this often for variable numbers of graphs. Not MxN, but up to 3x4.
04-10-2024 03:22 PM
Here's a 1*2^N example that sort of does a layout to prove the concept. I think most of the hassle will come from getting everything aligned, I'll check out the fixed grid examples and see if they have the math done already...
04-11-2024 06:43 AM - edited 04-11-2024 06:46 AM
@avogadro5 wrote:
Here's a 1*2^N example that sort of does a layout to prove the concept. I think most of the hassle will come from getting everything aligned, I'll check out the fixed grid examples and see if they have the math done already...
Not sure, what you exactly needed, but attached two simple examples from some very old forum posts with SubPanels organized as linked list and wrapped into XControl. Not so "heavy" as "Windows-8-Style-UI-demo", proposed above. May be will be useful for you as source of ideas. Both saved in LabVIEW 2018. In first example different SubVIs are inserted (and you can "undock" these from panels and dock back), but in second - the same coming from template.
04-11-2024 11:10 AM
@Andrey_Dmitriev wrote:
@avogadro5 wrote:
Here's a 1*2^N example that sort of does a layout to prove the concept. I think most of the hassle will come from getting everything aligned, I'll check out the fixed grid examples and see if they have the math done already...
Not sure, what you exactly needed, but attached two simple examples from some very old forum posts with SubPanels organized as linked list and wrapped into XControl. Not so "heavy" as "Windows-8-Style-UI-demo", proposed above. May be will be useful for you as source of ideas. Both saved in LabVIEW 2018. In first example different SubVIs are inserted (and you can "undock" these from panels and dock back), but in second - the same coming from template.
This is the sort of thing I was looking for, it looks like it's using a M-deep nesting to accomplish an arbitrary number of panels. Thanks!
04-11-2024 11:21 AM
@avogadro5 wrote:This is the sort of thing I was looking for, it looks like it's using a M-deep nesting to accomplish an arbitrary number of panels. Thanks!
You're welcome! Very glad to see that this was helpful for you!