04-20-2023 02:58 AM
Good morning.
I have a program of LabVIEW 2017 (atached to this post) where all the control elements needs to be inside of a tab control, and is going to be used in multiple screens with different size. When I put it in other screen, it doesn´t fit to it. I tried to do the solutions that were posted on other post, but it doesn´t seems to work. Can someone help me?
The program is linked to this post
Solved! Go to Solution.
04-20-2023 04:59 AM
Fitting the tab is easy (turn fit to pane on), so I assume you also want to scale everything on the pages.
That's actually quite hard. You basically have to scale every single object 'manually' (by it's property nodes).
It would have been a lot easier if all the pages where implemented on different VIs and then loaded in a SubPanel. Then each VI could use splitters, and scaling would have been possible by configuring panes properly (still not always easy). But at this stage, that ship has sailed...
As what you want to do simply isn't easy (and a lot), you won't find an easy way out.
It doesn't help that everything is in 1 VI. Adding anything will be hard, adding complex things will be near impossible without a refactoring\redesign.
I have added scaling to 'the VI' before; scaling can be added in parallel. I used GitHub - Dynamic UI Scaling Toolkit for LabVIEW, which makes it easier (for me), not easy.
But honestly, without refactoring you'll run into problems.
04-20-2023 05:08 AM
btw, the excessively big diagram is already corrupted (at least after converting to LV20).
Wires run off the screen, because the I16 position of some nodes overflown the limit.
If you don't address this, your VI will be corrupted completely. If you don't have SCC or at least a backup strategy, you will loose all your work (well you can get the version you posted here).
Just a friendly warning. It will happen.
04-20-2023 08:47 AM
I also used to use Tab controls (though I thought they were kind of "clumsy" and a little "illogical" in structure) until I went to one of my first NI Weeks and learned about sub-Panels, which allow you to run separate VIs in dedicated Front Panel space and swap them around at will. Much (much!) nicer, cleaner, more logical.
Bob Schor
04-20-2023 10:38 AM
Read here for more on why I Hate Tabs
Use a custom Radio Button and a subpanel every time! OK, not every time but, you should consider the the Tab CONTAINER (it's not really a control) has no simple means to help organize CODE groups associated with the Tab Pages. That should send up red flags that cause you to think of alternatives first before dropping a Tab on the FP.
The idea of showing selectable SubVIs in Sub panels even ENFORCES Separation of Concerns . Because LabVIEW is a Graphical language Code Modularity is native. That is: the SubVI connector pane IS the module interface at the simplest level.
04-20-2023 10:42 AM
@Bob_Schor wrote:
I also used to use Tab controls (though I thought they were kind of "clumsy" and a little "illogical" in structure) until I went to one of my first NI Weeks and learned about sub-Panels, which allow you to run separate VIs in dedicated Front Panel space and swap them around at will. Much (much!) nicer, cleaner, more logical.
Bob Schor
But you do need to make at least 1 sub VI 🙄.
04-20-2023 12:01 PM
There is nothing wrong with using tabs if your code requires a massive amount of controls and you want to logically group related controls for easier navigation. It is just a way to isolate the user from a massive visual overload (example). The tab terminal is typically not even used on the diagram!
However, I strongly suggest to forget all about scaling tabs (and front panels in general!), because it will not work! What exactly do you want to show the user if the screen resolution is much larger? Just tons of empty grey(sic)space? Distorted controls with mismatched fonts??
Carefully design your front panel at fixed size and with defined (i.e. not symbolic!) fonts so it comfortably fits on the lowest screen you expect to use (e.g. 1024x768, 1280x1024). The days of 640x480 DOS windows are long gone!
04-20-2023 01:19 PM - edited 04-20-2023 01:34 PM
Thank you very much
I know that the size of the VI is excesive, but unfortunately I started the program with little/no knowing of how LabVIEW worked, and now there is no turning back.
Do you think that the toolbox that you shared coud help me even at the current state of the program? Also, I would like to know it the toolbox would work if I create a .exe
Thank you very much in advance
04-20-2023 01:28 PM
Thank you very much for your response.
Unfortunately, I´m actually new to LabVIEW, so could you explain me how to proper design the program to a smaller resolution?
I tried using File<VI Properties>Window size and editing it, but I think it does not work
04-20-2023 01:36 PM
@d_hunter13 wrote:
I tried using File<VI Properties>Window size and editing it, but I think it does not work
We can't really tell what you tried. Hopefully, your front panel is not maximized to the monitor, so just resize to your liking.