11-02-2016 04:16 AM
Hi everyone,
I am developping an application on a computer with a 23 inches screen, but the final application might be used on computers with 15 if not 14 inches screens. If I group all the commands and indicators together, then I can resize the whole front panel manually to make it fit the window. This works fairly well and keeps general propotions of the front panel I designed (although you still have to adjust one or two little things here and there, but I can live with that). Is was wondering if there was a way to do the same thing programmatically.
Is there a way to tell Labview to resize the commands and indicators (keeping proportions and relative positions) on the front panel so that everything fits in the application window?
Thanks.
Best regards.
Luc
Solved! Go to Solution.
11-02-2016 04:22 AM
Luc,
the biggest problem in designing a single panel for such different sizes is the font size. It can work decently if the resolution is comparable (e.g. 1200x1024), however, that is not common.
I recommend you to design two different panels and load the one which fits the resolution. By doing this, the smaller panel could e.g. use subpanels or tabs to organize things differently to the big panel.
When sticking to the one panel approach, i recommend to use splitters and to implement a resize functionality which doesn't leave unnecessary gaps or overlays between elements.
Also you might consider translation of text so you have to keep room for different string lenghts.
Norbert
11-02-2016 06:29 AM - edited 11-02-2016 06:30 AM
VI properties, Window Size, Tickbox Scale objects. It's not perfect, but if the panel is simple it works well.
Else you'll have to capture Panel Resize-event and recalculate and set object positions and sizes yourself ...
You should ofcourse design it from the worst case (the smallest screen), the panel scales UP better than it scales DOWN.
/Y
11-04-2016 11:26 AM
Thanks to both of you for your answers.
The solution about going in the VI properties works fine for what I need.
I'll arrange the front panel so that it fits the 14' screen, leaving the "Scale Objects" box ticked in the VI properties.
Regards
Luc