[Lazarus] Memo - scroll to caret position

Petr Kristan petr.kristan at epos.cz
Tue Jun 17 11:45:24 CEST 2014


Hi.

I set Memo.CaretPos and I want to scroll memo to be caret visible.

I found some solution in windows:
Perform(EM_SCROLLCARET, 0, 0);

But how to solve it in Linux and GTK2?

I tried:
Memo.VertScrollBar.Position := Round(Line*Memo.VertScrollBar.Range/Memo.Lines.Count);
but this scrolls only with ScrollBar and not with memo.

Thanks
Petr

-- 
Petr Kristan
.
EPOS PRO s.r.o., Smilova 333, 530 02 Pardubice
tel: +420 461101401    Czech Republic (Eastern Europe)
fax: +420 461101481




More information about the Lazarus mailing list