I have an image that is relative to page. When I drag/drop this image from the top of page 2 to the bottom of page 1 then the image "disappears".
The second call to ScreenToRTFPage changes RTFPageNr from 0 to 1 and causes the image to be placed at the bottom of page 2 instead of page 1.
procedure TWPCustomRtfEdit.MouseUp(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer);
...
if ScreenToRTFPage(FFrameVar.fx,
FFrameVar.fy, RtfX, RtfY, RTFPageNr, TRUE) and SaveChanging then
begin
if not ScreenToRTFPage(FFrameVar.fx + FFrameVar.fw, // IGNORE X, V5-11.2 moved here with IF
FFrameVar.fy
{$IFNDEF AllowTallObjects} + FFrameVar.fh{$ENDIF},
RtfX1, RtfY1, RTFPageNr, TRUE) then
begin
RtfX1 := RtfX + MulDiv(FFrameVar.fw, Memo.CurrentXPixelsPerInch, WPScreenPixelsPerInch);
RtfY1 := RtfY + MulDiv(FFrameVar.fh, Memo.CurrentYPixelsPerInch, WPScreenPixelsPerInch);
end;
...
#1
♥ 0