Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-06

Memo - scroll to caret position

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Petr Kristan

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

Reply by email