silmaril Posted January 10, 2008 Report Share Posted January 10, 2008 If you have a plot legend in LV 8.5, it's size and position changes when building an application and running the EXE. Even though this seems to be only a cosmetical issue, it means that there is no way to design a front panel that looks professional both in the development and runtime environment, if you want to use the plot legend. Steps to reproduce: 1) Unpack the attached archive PlotLegendBug.zip 2) Open the project PlotLegendBug.lvproj 3) Open PlotLegendBug.vi 4) Notice that the two plot legends each have a string indicator next to them that has exactly the same height as the plot legend. 5) Build the application using the build spec "PlotLegendBug". 6) Run the built application. 7) Notice that position, size and optical appearance of both plot legends have changed. Download File:post-7932-1199890708.zip Workaround: The only way is to design your panel, build the application, see what it looks like, correct the positions in LV, build again, correct the positions again, build again... until you end up with an application that looks good. Unfortunately when you finally have a good-looking built application, your panel looks very ugly in the development environment, so this doesn't really count as a workaround. This really is a problem, if you need to have a checkbox next to each plot legend item. Status: reported to NI, waiting for CAR number. Quote Link to comment
jg69 Posted January 11, 2008 Report Share Posted January 11, 2008 Hello, I don't think that this is a bug of LV. This happens in any newer version of LV with all fonts of a FP, as long as you do not set some font-settings in the ini-file of the application. LV then takes settings from windows desktop fonts. (e.g.: try to change font settings of Windows and look at the result). How to avoid: 1st possibility: set font options in ini file 2nd possibility: already change fonts of controls during programming. Jens Quote Link to comment
silmaril Posted January 11, 2008 Author Report Share Posted January 11, 2008 QUOTE(jg69 @ Jan 10 2008, 01:24 PM) I don't think that this is a bug of LV. This happens in any newer version of LV with all fonts of a FP, as long as you do not set some font-settings in the ini-file of the application. LV then takes settings from windows desktop fonts. (e.g.: try to change font settings of Windows and look at the result).How to avoid: 1st possibility: http://wiki.lavag.org/LabVIEW_configuration_file/Fonts' target="_blank">set font options in ini file 2nd possibility: already change fonts of controls during programming. Thanks for those hints! I played around with the ini settings, but I didn't succeed in solving this problem. I seems that I am able to define a larger font size, which makes the plot legend larger, but I couldn't get a smaller size. The 2nd possibility worked fine. I changed the font of the plot legend to "Tahoma 13" and it was identical in the development environment and built application. I still think this is a bug in LV! The Application Font changes with the Windows settings. This happens both in the development environment (after you restart LV) and in the runtime engine. I don't see any reason why this should look any different on the same computer with (of course) the same Windows configuration. But even if this worked correctly, it still was a good idea to set the font independently from the Windows settings if you need to be shure that there is a checkbox next to each plot name. Edit: I forgot to mention the CAR number: CAR 4H921LN3. Quote Link to comment
jg69 Posted January 11, 2008 Report Share Posted January 11, 2008 Since you got a CAR#, it looks like it is really a bug. Did not try everything I suggested this morning. At least you now have a workaround. Jens Quote Link to comment
Rolf Kalbermatter Posted January 29, 2008 Report Share Posted January 29, 2008 QUOTE(silmaril @ Jan 10 2008, 08:26 AM) Thanks for those hints!I played around with the ini settings, but I didn't succeed in solving this problem. I seems that I am able to define a larger font size, which makes the plot legend larger, but I couldn't get a smaller size. The 2nd possibility worked fine. I changed the font of the plot legend to "Tahoma 13" and it was identical in the development environment and built application. I still think this is a bug in LV! The Application Font changes with the Windows settings. This happens both in the development environment (after you restart LV) and in the runtime engine. I don't see any reason why this should look any different on the same computer with (of course) the same Windows configuration. But even if this worked correctly, it still was a good idea to set the font independently from the Windows settings if you need to be shure that there is a checkbox next to each plot name. Edit: I forgot to mention the CAR number: CAR 4H921LN3. It may be that you have fiddled with the default fonts in your development environment. Check your LabVIEW ini file for entries like FPFont=, BDFont=, AppFont=, DlgFont= etc. When you change the font settings while you have some control or text setting selected the change applies to that control or text. Without anything selected the change applies globally and will also be written to the INI file if it is not the default setting. An application has its own INI file and by default no Font settings are in there which will cause LabVIEW to use default Font settings. The LabVIEW 8.5 Application Builder does copy some of the INI settings from LabVIEW.ini into an application specific INI File unless you disable that by specifying your own INI file in the build. But I'm not sure if Fonts happen to be among them, as I almost always use customer specific Font settings for Buiild applications. So no, I'm sure it is not a bug, but yes I do think the Font settings and default Font configuration could use some extra explanation somewhere in a prominent spot in the online help. And the Font configuration dialog could be more intuitive. The checkboxes for Panel Default and Daigramm Default are a bit hard to understand in respect to how they influence the INI file and future changes to a VI. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.