TrfxMemoView position

edited 1:48PM 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 1:48PM
    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

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.