Hi everyone!
Is it possible to disable automatic scrolling in TSRichViewEdit? Scrolling starts automatically when, for example, I edit a math equation, then close the editor, and simply move the cursor up or down. If then I click in the editor (set focus), scrolling is stopped.
I reviewed all topics of the forum about scrolling but did not find an answer...
How to disable "auto-scrolling" in TSRichViewEdit?
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to disable "auto-scrolling" in TSRichViewEdit?
Can you give me step-by-step instructions how to reproduce this problem?
Re: How to disable "auto-scrolling" in TSRichViewEdit?
Yes, it's very simple. There is a test program in the archive. What we need to do:Sergey Tkachenko wrote: ↑Tue Feb 22, 2022 9:00 am Can you give me step-by-step instructions how to reproduce this problem?
1) run the program
2) add equation
3) double-click on the equation, close the editor
4) move cursor down to the bottom (no clicks)
5) move cursor up, to the top of the editor and beyond (no clicks)
I noticed that this scrolling is dynamic (responds to the intensity of movement and cursor position). Very similar to finger movements on a smartphone.
I also recorded the whole process on video:
https://youtu.be/vuJ4-xHYV9E
I hope it helps)
- Attachments
-
- srve_scroll.zip
- (58.03 KiB) Downloaded 772 times
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: How to disable "auto-scrolling" in TSRichViewEdit?
It happens because the dialog "eats" a mouse up message, and the editor thinks that mouse selection continues.
In SclRView.pas, find procedure TSRichViewEdit.MouseMove, and add at the very beginning of this method (after all sub-procedures):
I'll add this change in the next update.
In SclRView.pas, find procedure TSRichViewEdit.MouseMove, and add at the very beginning of this method (after all sub-procedures):
Code: Select all
if (srvs_IsScrollTimer in FState) and not (ssLeft in Shift) then
SetScrollTimer(False);