How to avoid scroll on SetSelectionBounds?
How to avoid scroll on SetSelectionBounds?
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?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
There are no methods to disallow scrolling on selection.
You can do the following:
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... thanksSergey 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;