TrfxMemoView position

edited 6:21PM in FastReport 4.0
I'm modifying TrfxMemoView objects from within my code.
(product = FastReport FMX v2.4)

I create multiple pages thru using PrepareReport.

Changing background color and font color works properly where the memo objects have different colors on each page.
If I try to do the same on the object position then the object changes position in ALL the pages.

The code that I use for the colors (the code that works) is:

Component := frxReport.FindObject('Memo41');
if Component is TfrxMemoView then
begin
Memo := Component as TfrxMemoView;
if MyValye<>0 then begin
Memo.Color := claBlack;
Memo.Font.Color := claWhite;
end
else begin
Memo.Color := claNull;
Memo.Font.Color := claBlack;
end;
end;

The code I use to change the memo-object position is:

Component := frxReport.FindObject('Memo41');
if Component is TfrxMemoView then
begin
Memo := Component as TfrxMemoView;
if (Xpos>0) and (YPos>0) then begin
Memo.Left := Xpos;
Memo.Top := Ypos;
Memo.Visible := true;
end
else begin
Memo.Visible := false;
end;
end;

I hope someone can help me... What am I doing wrong?

Thanks!

Comments

  • edited 6:21PM
    Hello CvdP,

    at which Position u Call ur second code?

    Does this work? (coloring works, and Change Position?)

    Component := frxReport.FindObject('Memo41');
     if Component is TfrxMemoView then
     begin
     Memo := Component as TfrxMemoView;
     if MyValye<>0 then begin
     Memo.Color := claBlack;
     Memo.Font.Color := claWhite;
     Memo.Left := 10;
     end
     else begin
     Memo.Color := claNull;
     Memo.Font.Color := claBlack;
     Memo.Left := 0;
     end;
     end;
    

Leave a Comment