How can I change the height of A richedit, so that the text is fully displayed and the scrollbar disapears. Thanks
You can assign the RichEdit height property so that it is big enough.
RichEdit1.Height := Max(MinHeight, RichEdit1.Lines.Count * LineHeight);
MinHeight
is the minimum heigth
you accept (for example empty RichEdit
).
LineHeight
is the mean heigth of the lines. Depends on the font height and content of the RichEdit
which is potentially highly variable.
The question you have not asked "How to get text extent in a RichEdit" is answered here.
-
-
1@AmirTofighi: That is exactly what is explained in the linked answer. – Andreas Rejbrand Jan 19 at 10:24