LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

resize controls proportionally

Hi
what am I doing wrong? when resizing following vi up and down the scaling doesn't stay correct.
any help would be nice.
yves
0 Kudos
Message 1 of 6
(3,876 Views)
Your buttons scale fine until you reach the limits of the text box. When you try to shrink the panel below the limit of the Boolean text box size, you find that the button shrinks no further. Then when you expand again, the panel forgets that the shrink operation was limited, and all of the buttons expand. In this manner the shrink and expand operation is irreversible. Yikes! Basically, the scaling does not automatically handle the Boolean text well.

Now, if you leave the Boolean text blank and use string indicators on top of the buttons (a big headache!), you will find that the controls scale fine, although, your text (keeping a fixed font size) will be truncated by the limits of the scaled text box. You can achieve the same thing with a text box deco
ration, but it is more difficult to programmatically change the value of decoration text.

Here's what I recommend. Scale the buttons as you think they need to be in the smallest case and make sure your panel is sized the way you want it. Then set the minimum panel size in the vi properties window. Your buttons should then scale reversibly back and forth from small to large and back again, although, the font size will remain constant. If you must change the font size, you will have to do it programmatically in an initialization routine using the button properties.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 2 of 6
(3,876 Views)
thanks for very elaborated and helpful answer. it is really annoying that LV can't handle such a basic function.
I had planned to show two different programs side by side on demand and to enlarge LV again after this.
but as you described this would be "a big headache" because I also have some indicators, a tab control and so on.
0 Kudos
Message 3 of 6
(3,876 Views)
There is always room for improvement for the LV development team. They get a lot of their ideas for improvement from these discussions. Hopefully, this "font scaling" issue will be addressed in a future version of LV.

I'm glad you found my answer helpful. Thanks for the good rating.;-)

jayme
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 4 of 6
(3,876 Views)
Tab control is also painful to resize. I basically gave up on resizing my VIs when Tab control is used. NI said it has been fixed in LV7 but obviously they didn't do enough test.

-Joe
0 Kudos
Message 5 of 6
(3,876 Views)
I found that even when I choose "fit to contents" the tab control does not automatically resize. They "autogrow" just fine, but they don't "autoshrink". I had to programmatically adjust the tab size to get it to work right.
jc
Mac 10.4
LV7.1
CLD
0 Kudos
Message 6 of 6
(3,876 Views)