How to make a particular line to topmost?
Posted: Wed Mar 18, 2020 11:07 am
How can I make the line where the cursor is, to the topmost of a TRichViewEdit?
Support forums for TRichView, ScaleRichView, Report Workshop and RVMedia components
https://textally.com/forums/
Code: Select all
var
R: TRect;
ItemPart: Integer;
...
with RichViewEdit1.TopLevelEditor do
begin
ItemPart := RVData.GetItemPart(CurItemNo, OffsetInCurItem,
IsCaretAtTheBeginningOfLine);
RichViewEdit1.GetItemCoordsEx(RVData, CurItemNo, ItemPart, False, R);
end;
RichViewEdit1.ScrollTo(R.Top);