05-27-2011 11:42 AM
Hi,
I want to make all objects on the front panel such as font, buttons, indicators auto scale to fit screen resolution. I wonder if Labview have this feature? Any help will be very appreciated.
Thanks,
David
05-27-2011 11:49 AM
01-06-2012 11:24 AM
Hi, I am having similar trouble with screen resolutions on a program I have made. I made all the icons for a 1920x1080 monitor, and if I change the monitor for a smaller size, the front panel is cropped. See image for an illustration. I can remake all the icons but it takes about 1 or 2 days, I have done this for 1600x900, but the icons were slightly blurry after resizing. I need a way of making the application work on all monitors between 1024x768 and 1920x1080 automatically, without having to remake the GUI for each intermediate monitor size. I would like it to work like Mac OSX where the icons in the dock expand with a fisheye effect, but remain clear and non-fuzzy at all sizes. Is there a way of doing this? Please note, I have 4 panels in the front panel, so the autoscaling option does not work.
01-13-2012 09:22 AM
Hi MadScientist!
I've made some research on what you ar trying to accomplish. What we've thought is that you might need to get the screen resolution pragmatically and then code the panel sizes accordingly. This is because autoscaling isn't anoption as you've mentioned.
I will leave you some links that I believe will be useful for building your application.
Programmatically Changing Font Size of Front Panel Controls for Different Screen Resolutions
Programmatically Change Front Panel Size to Fill Your Monitor
Reference Example for Reading Screen Resolution
I hope this helps! Don't hesitate to post if you have any other question
Kind Regards
Carlos O
Applications Engineer
National Instruments
01-17-2012 12:56 PM
Hi Carlos,
Thanks for the reply.
I can see some possible solutions based on what you have given me. I will work on it and post on the forums if I still can't solve it.
James
07-12-2018 01:07 PM
why the links do not provide the solution.
07-12-2018 01:19 PM
07-12-2018 01:38 PM
Since labview front panel objects are defined in terms of pixels, they do not inherently scale.
Some interfaces work pretty well using panes and "scale object to pane" type of scheme. But these are typically more difficult to design for cluttered front panels. (you also can't use a splitter inside of a tab control)
Another route is to programatically set the size/position/font for each object. This does not work for decorations and can be tricky (example. XY graph size property node is for the internal portion of graph; excludes space for axes.... so you have to use a different scaling factor than buttons). and a tab controls "tab" does not have a font size property node.
While not ideal, a common approach is to design 3-5 versions of your front panel for various screen resolutions. During your software initialization step, get the monitor resolution and load the appropriate front panel VI and center it.
Use the "VI Package Manger" and look at the "NI Front Panel Layout" toolkit (it's free). This toolkit implements an approach at using property nodes for scaling. Once you configure the front panel for a given screen resolution, you use the toolkit to save the properties of each object to file, naming the configuration. Save 1 for each screen resolution of interest. Then at runtime, load the configuration appropriate for current screen resolution and position it.