Hello,
I do it at the moment this way. However it does not seem correct. It
seems the Height does not taken into account the free dots above each
line. In my application I just add 4, but I gues this is depending on
font. Someone has a better idea ?
procedure CheckScrollBar(Memo: TMemo);
begin
if (Abs(Memo.Font.Height) + 4) * Memo.Lines.Count > Memo.Height then
Memo.ScrollBars := ssVertical
else
Memo.ScrollBars := ssNone;
end;
---
Rgds, Wilfried
http://www.mestdagh.biz
__________________________________________________
Delphi-Talk mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi-talk