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.
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.
05-20-2010 11:59 AM
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!
05-20-2010 12:07 PM
05-20-2010 02:09 PM
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
05-21-2010 02:16 AM
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.