02-27-2015 09:04 AM
I'm working on a LV 2014 program at work and occasionally I take my computer home and work on it there. At work my laptop plugs into a docking station and I have two monitors. At home I just have my laptop with it's screen. Last night I spent some time at home resizing buttons and labels and making the front panel layout look nice and neat. This morning I return to work, plug my laptop into the docking station, bring up the program and now the text, labels, indicators, etc are different sizes, out of proportion, not fitting, etc.
I know I should lock the front panel when I'm done working on it, and last night it was late and I forgot. But I'm curious why some labels and text change sizes when viewed on a different monitor, but other parts don't change. Why is that? Is there a way to have the program automatically fit the monitor?
02-27-2015 09:18 AM
Did you use "System" controls and indicators?
02-27-2015 09:54 AM
From any place on the Windows desktop:
Right-click on Computer. Select Screen Resolution. From the Screen Resolution window, click on Make text and other items larger or smaller". Note which radio button is slelected. Hook up to tthe docking station and repeat.
With and without docking station are two different hardware configs, and I wouldn't suprised if they were different. The answer, of course, is to make them match. Preferably make them both match the configuration where your stuff looks correct.
03-02-2015 12:08 PM
There are a few settings you can try changing in your VI. Open your VI and click File -> VI Properties. Click the drop-down box and choose Window Size. Check the two boxes called "Maintain proportions of window..." and "Scale all objects on front panel..." I have attached a screenshot showing these options. This would be the simplest way to fix the issue, but does not work for every case. Usually this issue requires a lot of tinkering with settings and locking elements on the front panel.
03-02-2015 12:37 PM
Jed - Yes, I'm using system controls and indicators. Although I will say this program was originally written in an older version of LV so there may be some legacy issues.
Bill and Dan - I checked both of your suggestions and my settings were okay. One thing that puzzles me is some items resized while others did not. But I'll definitely have to "lock" things down after saving them.
Also, I notice in that Window Size panel under VI Properties it lists a Minimum Panel Size, which you have set to 0, 0. I read the "help" on that topic but I still am not exactly sure what that does. It seems to me like a Maximum Panel Size would make more sense as it would let you know when your panel is reaching the limits.
03-02-2015 01:23 PM
I read somewhere that it is better to use Windows native fonts, like Arial, etc..., when the application runs on different computers and monitor resolutions. It works very good for me.
03-02-2015 02:14 PM
Usually these issues are hard to track down because the source of the problem is generally related to Windows rendering your front panel. If you really want to keep certain controls and indicators in a certain position with a given label size and are willing to spend a little time, you can programatically set the location and text size of your controls with property nodes. If you're going down that path, you would want to use the Position and Label Text Size properties.
03-02-2015 02:32 PM - edited 03-02-2015 02:33 PM
I never use symbolic fonts (application font, etc.) and specifically define all fonts (e.g. tahoma 13). A typical front panel does not scale right otherwise if the os fonts are changed.
03-03-2015 04:41 AM
Arial is a standard windows font but on some systems (we have a few Japanese customers where this is the case) it gets substituted anyway of the system Locale is set to a certain region (Japan presumably).
AFAIK Tahoma does not generally get replaced so it^s a better choice for a constant UI experience.
03-03-2015 06:38 PM
To be safe, I outfit IDE (LabVIEW.ini) and EXE (My Application.ini) INI files with:
appFont="Segoe UI" 13
systemFont="Segoe UI" 13
dialogFont="Segoe UI" 13
CurrentFont="Segoe UI" 13
FPFont="Segoe UI" 13
BDFont="Segoe UI" 13
This way changing the OS/OS settings, LabVIEW version, or Dev vs. Deploy doesn't affect the look of your application.
For a more familar UX before Vista (e.g. XP and previous), use "Tahoma" instead of "Segoe UI" above.