LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resize Tab Control to fit in any screen

Solved!
Go to solution

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

0 Kudos
Message 1 of 14
(2,033 Views)

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.

Message 2 of 14
(2,013 Views)

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).

wiebeCARYA_0-1681985241905.png

 

Just a friendly warning. It will happen.

Message 3 of 14
(2,010 Views)

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

Message 4 of 14
(1,984 Views)

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.  


"Should be" isn't "Is" -Jay
Message 5 of 14
(1,970 Views)

@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 🙄.

0 Kudos
Message 6 of 14
(1,967 Views)
Solution
Accepted by topic author d_hunter13

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!

 

 

Message 7 of 14
(1,955 Views)

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

0 Kudos
Message 8 of 14
(1,924 Views)

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

0 Kudos
Message 9 of 14
(1,920 Views)

@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.

Message 10 of 14
(1,911 Views)