06-23-2011 07:07 AM
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 ?
06-23-2011 07:48 AM - edited 06-23-2011 07:49 AM
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;))
06-23-2011 07:58 AM
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?
06-23-2011 08:14 AM
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.
06-23-2011 08:51 AM
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 .
06-23-2011 08:55 AM
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