Howdy
I am trying to programmatically (i.e., with a speedbutton) scroll the AdvRichEditor. I can test to see if the vertical scrollbar is at the top with AdvRichEditor.TopLeft.Y=0 and disable the button trying to scroll up.
How does one check to see if the scrollbar is at the bottom?
I was told that scrolling to the bottom can be accomplished by setting TopLeft.Y to a large number, which works.
However, when scrolling down, I have tried to see if the number changes after assigning a large number to it, and if it doesn't, it's probably at the bottom. This seems not very precise...
Any suggestions?
You can test this with:
AdvRichEditor1.VertScrollBar.IsScrollBarVisible: boolean;
I am sorry, Bruno, this reply is not helpful and does not address the question. I have been trying to understand the relationship between the scroll position and the size of the thumb of a vertical scroll to see if it is at the BOTTOM of the page.
Which specific parameters can I check with respect to AdvRichEditor.VertScroll.size etc to tell if i am at the bottom?
Anyone?
Please?
Doug
You can get the position and range of the vertical scrollbar via:
advricheditor.VertScrollBar.Position: integer;
advricheditor.VertScrollBar.Range: integer;
When the richeditor is scrolled at the end, advricheditor.VertScrollBar.Position + advricheditor.ClientHeight will be equal to advricheditor.VertScrollBar.Range