Resizing TEdit? lazarus / 10-Designer ---------------------------------------------------------------------- HatForCat · 2013-03-26 01:13 Hi All, I like my TEdits to be Border Style = bsNone which Lazerus does fine. But the height of the Edit is controlled by the Font size as if there was a border. How can I over-ride this and make a border-less TEdit look the right size for the text it contains? I know it makes sense to limit the height to the Font size, but that should be adjusted when the borders are removed as there is a lot of white-space below the text. ---------------------------------------------------------------------- Blaazen · 2013-03-26 01:17 Set AutoSize:=False; and then you can control height. AutoSize = True is useful for cross-platform development. TEdit has the native height on all platforms (Win, Qt, ...). ---------------------------------------------------------------------- HatForCat · 2013-03-26 01:21 Ah Haa! Thanks. I assumed (yeah, I know it is wrong) hat AutoSize applied to the length as with Labels. ---------------------------------------------------------------------- Blaazen · 2013-03-26 01:30 AutoSize is very flexible and it can be designed in different ways. For TLabel it fits Height and Width to the text. For TEdit it fits only Height. If you want to design your own components you can override method CalculatePrefferedSize and decide how it will behave. There are several "AutoSize" articles on Lazarus wiki. ---------------------------------------------------------------------- HatForCat · 2013-03-26 17:31 Thanks, I understand about inheriting and changing stuff, but I like to try and stay with the "standard" options so I don't have to make the same changes over and over again with new releases.