Page 1 of 1

How to avoid scroll on SetSelectionBounds?

Posted: Mon Jan 11, 2010 8:54 am
by enzogupi
When I select a part of text that is partially not visible the editor scolls to bring all selection into view. Is there a way to avoid this?

Posted: Mon Jan 11, 2010 5:55 pm
by Sergey Tkachenko
There are no methods to disallow scrolling on selection.
You can do the following:

Code: Select all

vp := rve.VScrollPos;
hp := rve.HScrollPos;
rve.BeginUpdate;
<select here>
rve.VScrollPos := vp;
rve.HScrollPos := hp;
rve.EndUpdate;

Posted: Wed Jan 13, 2010 12:34 pm
by enzogupi
Sergey Tkachenko wrote:There are no methods to disallow scrolling on selection.
You can do the following:

Code: Select all

vp := rve.VScrollPos;
hp := rve.HScrollPos;
rve.BeginUpdate;
<select here>
rve.VScrollPos := vp;
rve.HScrollPos := hp;
rve.EndUpdate;
It works... thanks