LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strange Problem of class style Simple Numeric Control of size

I have a strange problem for  numeric control of size setting.

I set the numeric control size ,width value is 85 and height value is 39.

Then I copy this VI to another computer to Coding.

I find that the control be different size with the source. The height value changed from 39 to 35 by Labview itself.

So, I correct the error value from 35 to 39 and copy the VI to my original computer to chek.

The size of height still be changed to 35.

How can I prevent this situation ?

 

0 Kudos
Message 1 of 6
(2,420 Views)

Hi Smartx,


Did you mean that you are copying the control or a vi with the control on its front panel to another computer? If its a VI which your talking about, then check the Window Size option in the VI's VI Properties and check whether "scale all objects on front panel as window resizes" option is ticked or not. If it is ticked, untick it and save your vi. This will be rectified. 

If you copy a vi with this option ticked from a computer of one resolution to another computer of a different resolution, all the front panel controls and indicators may get resized.

Regards,

Nitzz

(Give Kudos to Good Answers and Mark it as a Solution if your problem is Solved;)) 

0 Kudos
Message 2 of 6
(2,412 Views)

Hello,I find the problem.

When I use the other computer to read orgin VI, the control size has be set to text size.

If my font size is 31 , the height value has be set to 35.

 

Now I have a question, I cant find the option of "size to text" in control or Indicator.

This option usually be used in controls or Indicator component 's lable or caption.

Where can I find the option?

 

0 Kudos
Message 3 of 6
(2,408 Views)

It is possible LabVIEW may be resizing the control to fit the font of the control.  Are you using Application or Dialog font?  You could try changing it to Arial, for example, to test if that fixes it.  Are the two computers runnign the same OS and theme?  LabVIEW's application and dialog fonts are based on OS settings and the font can change from PC to PC.  LabVIEW auto-adjusts the heights to fit the font.

 

I am wondering if LabVIEW does this all the time (the Arial test may not even correct that).  If it does, this could be a bug.

 

You didn't go into details about how this sizing works, but a possible workaround is to resize the control every time it runs, to guarantee the size you want.

0 Kudos
Message 4 of 6
(2,403 Views)

Hello, Thx for reply ^^~

I use using Application font and font size is 31. Control's height is 39 .

 

I have trying other font like Arial in this A computer ,but the control's size still be changed to fit the font size in the B computer.

The control's height be auto-setted to 35 by labview.

 

The two computers's OS(XP) and theme is the same.

I dont set the Window Size option in the VI's VI Properties , so it's default value. Two option is not ticked .

 

 

0 Kudos
Message 5 of 6
(2,389 Views)

There is no option for size to text.  You can almost get it right (I've always needed to add a fudge factor) using Get Text Rectangle.

 

See this thread for some additional useful info on using it:

 

http://forums.ni.com/t5/LabVIEW/Community-Nugget-Get-Text-Rectangle-font-tip/m-p/1144143

 

 

0 Kudos
Message 6 of 6
(2,386 Views)