How would I go about to scroll to the very top or my ScaleRichview?
I unsuccessfully tried the following:
A) srv.RichViewEdit.ScrollTo(0);
B) srv.RichViewEdit.VScrollPos := 0;
C) srv.VScrollPos := 0;
Etc.
but nothing will make it scroll to the very top.
Furthermore, why would I use
A) srv.RichViewEdit.VScrollPos := 0;
VS
B) srv.VScrollPos := 0;
A bit confusing.
Which one has precedence over the other? What's the difference?
What am I doing wrong? What do I have to do to scroll to the top?
Thanks in advance for any input you can provide,
Richard
Hot to scroll
-
- Posts: 4
- Joined: Mon Nov 24, 2014 4:22 pm
-
- Site Admin
- Posts: 17557
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
This code works:
What problem do you have with it?
srv.RichViewEdit.VScrollPos := 0 and srv.RichViewEdit.ScrollTo(0) are incorrect, because scrolling in internal editor does not initiate scrolling in SRV.
SetSelectionBounds scrolls to make the caret visible, so the first line will be visible after moving the caret to the beginning. But it is not necessary scrolls to the very top, because of margins and a gap between the top side and pages.
Code: Select all
SRichViewEdit1.VScrollPos := 0;
srv.RichViewEdit.VScrollPos := 0 and srv.RichViewEdit.ScrollTo(0) are incorrect, because scrolling in internal editor does not initiate scrolling in SRV.
SetSelectionBounds scrolls to make the caret visible, so the first line will be visible after moving the caret to the beginning. But it is not necessary scrolls to the very top, because of margins and a gap between the top side and pages.