Ruud 3 Posted September 24 This is how a normal TEdit looks like : The text is horizontally aligned , but not vertically . Relevant properties for Edit1 : Alignment | taCenter BevelWidth | 1 Height | 30 Width | 60 And this is how you want your TEdit to look like : The text is both horizontally and vertically alligned ! The solution is quite simple : define a TEdit within a TPanel . Relevant properties for Panel1 : Alignment | taCenter BevelWidth | 1 Height | 30 Width | 60 Relevant properties for Edit2 : Alignment | taCenter BevelWidth | 1 Height | 22 Left | 1 Top | 7 Width | 58 Ruud Schmeitz Maastricht Share this post Link to post
Uwe Raabe 2061 Posted September 24 5 hours ago, Ruud said: The text is horizontally aligned , but not vertically . I usually keep the default AutoSize = True setting. IMHO, this looks better than the large gaps above and below. Share this post Link to post
corneliusdavid 218 Posted September 24 12 hours ago, Ruud said: And this is how you want your TEdit to look like : I agree with Uwe but if you really want the space around your edit area, perhaps put the edit box in a panel, check AlignWithMargins, and turn off the border for the text box. Share this post Link to post
Ruud 3 Posted September 25 17 hours ago, Uwe Raabe said: I usually keep the default AutoSize = True setting. IMHO, this looks better than the large gaps above and below. Unfortunately that doesn't work in my case . With the chosen Font ( Verdana , 7) , AutoSize = True resizes the height of the TEdit to 20 , while (for some good reason) it must be 30 . Share this post Link to post
Uwe Raabe 2061 Posted September 25 5 hours ago, Ruud said: while (for some good reason) it must be 30 Well, in that case... Share this post Link to post
Tommi Prami 131 Posted September 25 That feels like a bug to me. Seems that panel should not affect that, or am I missing something obvious. Vertical align into the edit would be quite nice to have. There must be palaces it would be useful. -tee- Share this post Link to post
Uwe Raabe 2061 Posted September 25 1 hour ago, Tommi Prami said: Vertical align into the edit would be quite nice to have. As long as it is a native Windows control, we are limited by its internal functionality. Currently it doesn't support that: Edit Control Styles 1 Share this post Link to post