LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

controls change size installer

Solved!
Go to solution

I have an executable that has boolean controls with images. Some of these controls distort after the application is installed on another computer. This distortion also occurs with some of my other data structures and the result is that the nicely laid out GUI is distorted so badly that some of the controls aren't even usable. The application is fine on the computer where I did my development work. I'm running Windows 7 64 bit it on all the computers. I would also note that this is a long standing problem that I have had starting with version 8.2 and continuing to 2012.

0 Kudos
Message 1 of 8
(2,757 Views)

This is usually caused by different fonts. LV usually uses a logical font (application or dialog) for the text and on the other PC another font is chosen to represent that logical font.

 

Options:

  1. Change all the text to use a specific font instead of the application or dialog.
  2. Add the AppFont and DialogFont lines to the application's INI file to use the application to use the font you want. Do a search here to find out exactly how to do that.

___________________
Try to take over the world!
0 Kudos
Message 2 of 8
(2,754 Views)

I suspect that I may have difficulties with fonts on some of my controls. However, some of the controls that distort are booleans with images and no text displayed. The image was imported from the clipboard and is a 32x32 pixel image. The caption and label are not displayed. The check box for displaying the boolean text is not selected.

0 Kudos
Message 3 of 8
(2,749 Views)
Solution
Accepted by topic author Monroe

If I remember correctly, the font affects this even if the text is not visible (presumably because the text visibility can be controlled programatically, so the control calculates its initial size from it even if it is not visible).

 

I would suggest trying to change all the text to a specific font and then build the EXE and see if that helped.


___________________
Try to take over the world!
0 Kudos
Message 4 of 8
(2,742 Views)

Hi,

 

I too had this issue and it was indeed linked to font settings on different computer - even though the buttons were without any text and image only.

Unfortunately not even setting the font to something fixed (like Arial 12) was enough to solve the issue. On a notebook with very high resolution display buttons would get distorted anyhow.

I ended up using property nodes to set the size of the buttons at runtime - luckily I only had two buttons like that.

 

Rescaling unlabeled buttons according to font settings is a big failure on NI's part imo.

 

Regards

Florian

0 Kudos
Message 5 of 8
(2,740 Views)

@Florian.Ludwig wrote:

 

On a notebook with very high resolution display buttons would get distorted anyhow.


That's probably due to high DPI settings. When you configure the OS to do that all the fonts grow relative to what they would be, but nothing else does.


___________________
Try to take over the world!
0 Kudos
Message 6 of 8
(2,736 Views)

Hi tst, I think so too.

If you are only using the executable to give your program to a colleague then this is not an issue.

Once you start distributing to customers this one exception to fixed size fonts may get you into trouble.

I felt lucky having one in the department so I noticed this behaviour before shipping 🙂

 

Regards

Florian

0 Kudos
Message 7 of 8
(2,734 Views)

Well, you can't expect to be able to test all the permutations in advance, and fonts and different resolutions are a problem in general, so even if you have shipped it like that it wouldn't necessarily be a huge issue. I can say that I've seem multiple programs screwed up by the high DPI settings, although less so in recent years, either because MS has improved the algorithhms or because people have adapted their programs or because I turned it off (I can't remember).


___________________
Try to take over the world!
0 Kudos
Message 8 of 8
(2,718 Views)