Scroll Past end of document with BottomMargin
Posted: Fri Jul 19, 2024 1:20 am
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.
However, I don't see the BottomMargin changing at all. What am I doing wrong?
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);