Have you tried to create application like \srv_demos\Demos\CustomDraw\Rectangles\DrawAll, but wich also draws rectangles when either RVHeader or RVFooter is edited?
Try to replace SRichViewEdit1.RichViewEdit.RVData by SRichViewEdit1.ActiveEditor.RVData and enter some text into RVHEader. You'll see that coordinates of rectangles are converted relative to SRichViewEdit1.RichViewEdit, not SRichViewEdit1.RVHeader.
Public method ConvertRVtoSRV uses DoConvertRVToSRV which receives TCustomRichViewEdit as parameter.
Now I have to do this:
Code: Select all
type
TSRVEAccess = class(TSRichViewEdit);
Code: Select all
if FSRVE.ActiveEditor.GetItemCoordsEx(RVData, ItemNo, PartNo, True, Rect) then
begin
TSRVEAccess(FSRVE).DoConvertRVtoSRV(Rect.TopLeft, FSRVE.RVHeader,
Rect.TopLeft, PageNoStub, False);
TSRVEAccess(FSRVE).DoConvertRVtoSRV(Rect.BottomRight, FSRVE.RVHeader,
Rect.BottomRight, PageNoStub, False);
Result := True;
end
else
Result := False;