Page 1 of 1

Scroll Past end of document with BottomMargin

Posted: Fri Jul 19, 2024 1:20 am
by jgkoehn
I am working on getting a RVEdit to scroll until a checkpoint lines up with the top of a RVEdit view.
As recommended elsewhere I am using BottomMargin.

Code: Select all

        Y := 0;
          if RVData is TRvTableCellData then
            (RVData as TRvTableCellData).GetOrigin(X, Y);

          Y := RVData.GetCheckPointYEx(CPD) + Y;

          if Y > (rv.DocumentHeight - ((rv.ClientHeight div 10)*9)) then begin
             rv.BottomMargin := ((rv.ClientHeight div 10)*9);
          end else begin
             rv.BottomMargin := OrgBottomMargin;
          end;
          //rv.RefreshAll;
          //rv.FormatTail;

          rv.ScrollTo(Y);
          
However, I don't see the BottomMargin changing at all. What am I doing wrong?

Re: Scroll Past end of document with BottomMargin

Posted: Fri Jul 19, 2024 10:20 am
by Sergey Tkachenko
After changing BottomMargin, call Format (or Reformat, if the document is already formatted)

Re: Scroll Past end of document with BottomMargin

Posted: Wed Sep 04, 2024 6:45 pm
by jgkoehn
Thanks sir works well.