TextArea font size bigger than TextField font size

Hi there,

I have different text renderings on Windows and OSX with TextAreas.

All my TextAreas and TextFields were designed using Xojo default properties (font = system, size = 0, unit = point).

When displayed on Windows the TextArea font size is always bigger than the TextField one.
When displayed on OS X both text sizes are the same.

I have a small test app demonstrating the problem.

Printscreens here:
link text

Seems like a bug …

Is there a workaround ?

Developing with Xojo 2014r2.1 on OS X 10.9.4
Running on Windows7 SP1

Thanks !

Olivier

You may have to use the #Pragma statements to choose your platform and apply the correct sizes.

#IF TargetWin32 Then
// set your win sizes
#ELSEIF TargetMacOS Then
// Set your mac sizes
#ENDIF

I just had to do this very thing for my open source project. :slight_smile:

Thanks Mike.
But my problem is that the font size is the same for both TextField and TextArea (font = system, size = 0, unit = point), they just show with a different size in Windows.

I just want to stick to these default parameters to have my app using the user system settings.
I don’t want to specify a font size other than 0.

And if I’m using #pragma, is there a way to have this done once application wide ?

[quote=125441:@Olivier Colard]I just want to stick to these default parameters to have my app using the user system settings.
I don’t want to specify a font size other than 0.[/quote]

There seem to be no way to get the font larger in TextField without touching the size. You do not have to depart from System so you keep the font selected by the system, but you will need to select something like 12 to get the same effect as the TextArea.

You could set the font for all TextFields by going through all open windows and their controls. The pragma statement Mike showed you is a conditional compilation directive.

With 2014r2.1 on Windows 7 I get the same size in a text field & text area - its pixel for pixel the same size
But ONLY when text scaling is set to 100% in the windows control panel

IF it’s turned on the text area does scale the text - the text field does not and you get different sizes

Do you have text scaling turned on ?
You can see this here
The first has no scaling - the second is set to 125 percent in the control panel

Actually, the TextField IS scaling the text, just not to the same physical size as the TextArea - and that’s the issue.

I noticed this issue this morning on my Surface Pro.