LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple screen sizes?

I am using a front panel VI with 4 panels on it with graphs, buttons and indicators.
 
I am using two resolutions 1024*768 & 1280*800
 
At present I am doing two seperate builds as the resize option just messes things up.
 
I am using an openG resize to largest decoration but the only way I can see to do this clean and correct is to to back in and make the decoration larger and shuffle all the buttons.
 
can anyone shed some light on this for me please?
0 Kudos
Message 1 of 4
(2,817 Views)

I have had the exact situation, where an application that had 30+ screens could be used on 800x600 or 1024x768. What I settled on was to programmatically re-center the GUI rather than programmatically re-sizing it. The good thing is, you (and me) are not switching between two grossly dissimilar resolutions, so you don't really need to resize the controls to make them usable.

I had a setup button for the user to choose screen resolution, and I threw this setting in a Global. In each screen, I programmatically centered the GUI as shown in the JPG.

edit, add-on: The -60 and -40 in the input cluster constant just so happened to be the "center" of the screen I was working with for 800x600. You'll have to find the center (actually I think it's the upper left corner) of each screen and plug the numbers in accordingly. It's easier than it sounds. I have VI that will find values for you if you want it, but I usually just read the Pane Origin Proerty Node first, then use the numbers, which in this case were -60 and -40. 

 



Message Edited by Broken Arrow on 04-24-2008 08:32 AM
Richard






0 Kudos
Message 2 of 4
(2,779 Views)
sample attached.
Richard






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

You can also use the screenres.dll from here http://zone.ni.com/devzone/cda/epd/p/id/5421 to query the actual resolution of the screen your application runs on and then use that information to resize or center your GUI automatically.

Regards, David

0 Kudos
Message 4 of 4
(2,753 Views)