Forum > LCL

Vertical alignment of text within TEdit

(1/2) > >>

pleumann:
Is there a way to vertically center the text within a TEdit, similar to TLabel.Layout or is that not generally possible because the underlying OS control would need to support that everywhere?

Cheers
Joerg

pleumann:
Thinking about it, maybe my problem is different. I am setting the font size of my TEdit to 18 instead of 12. While the cursor initially appears in the right location, the actual text content I type is positioned "too high" and hence only partially visible. I thought it would be caused by me disabling AutoSize and setting my own size for the TEdit, but it's the same with AutoSize enabled.

This is Lazarus 2.2.6 with FPC 3.2.2 on MacOS Monterey (hi-res iMac, but I tried fiddling with the project properties already).

pleumann:
Weird. If I set the font name to "default" it's fine. For all other fonts it looks wrong (I didn't actually try all, of course, but a couple including Arial and some Mac-specific fonts).

Ten_Mile_Hike:
Also; the "anti aliasing" property might be causing a hidden problem for you

wp:
I know there is some font-related code in LCL scaling, and it looks as if something is missing for the cocoa widgetset. You should post this issue in the bug tracker (see link in the left side-bar) so that developers can see it.

Navigation

[0] Message Index

[#] Next page

Go to full version