From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing Nightmare

I'm using Labview 9.0. The application I'm working on has got a fairly big and complicated user interface with graphs on tabs, buttons, text boxes etc.

 

I've checked out the advice here:

http://forums.ni.com/ni/board/message?board.id=170&thread.id=270639&page=1

 

and I've tried using the VI options to scale all objects with the front panel, and to maintain proportions of the window for different monitor resolutions.

However, it still does butt-ugly things. Stretching the window then shrinking it back to the same size means that my previously aligned controls are now all wonky. Has the layout control improved at all 9.0? Is there any way for me to specify which controls I want to stay aligned, and where I want to anchor them to? Or which ones I want to resize, and whether I only want them to resize horizontally or vertically? Do I have to do all this programatically, and if so, can anyone point me at some good articles/code?


Thanks!

0 Kudos
Message 1 of 4
(2,316 Views)
I don't think this has changed or improved in LV 2009.  Hear me NI:  we would love to have to ability to lay out user interfaces with anchoring properties in controls!  Most modern GUI development allows for docking, anchoring, more robust containership, splitting, etc, to allow a UI to adapt to resizing operations.  Here is another gripe, when the font changes size in an NI GUI component, the component will stretch to fit the size of the font at run-time.  I hate that.  Also a bummer is that the application font can change from system to system.  I hate that too.  😛
0 Kudos
Message 2 of 4
(2,310 Views)

I did this once in 7.1. If you have a simple UI (like a graph and some attached controls), use the group feature + scale object with pane.

For the more complex objects, you will need to code the scaling on your own. It is do-able, but a lot of stupid pixel calculations. You just need for each control/indicator the properties position and bounds + a clever algorithm to place them correctly. Also, limit the minimum height and width of the FP.

I think with the introduction of panes it is a bit better today than in 7.1

 

Felix

0 Kudos
Message 3 of 4
(2,282 Views)

Size all front panel controls with window will NEVER work completely correct no matter how much resources NI will throw at this. It is a concept that can only fail.

 

Instead you can get a quite good effect if you use multiple panes in the frontpanel, one for every group of similar controls. Obvioulsy a graph has quite different intuitive resizing behaviour than a string or numeric control, and also different than a button, so you need to make sure these controls get into their own pane where you now can configure each pane accordingly to the desired behaviour of that control or group of controls.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(2,252 Views)