Manually align object
johnnix
Serrai, Greece
Hello,
I wish to manually align a TfrxMemoView inside a page by code (I don't want to use the Align property). On the OnBeforePrint event of the MemoView I have the code:
MemoView1.Left := Page1.PaperWidth - Page1.RightMargin - MemoView1.Width;
but it does not place the object in the position I want, far to the right of the page. Any help would be mostly appreciated.
Kindest regards
I wish to manually align a TfrxMemoView inside a page by code (I don't want to use the Align property). On the OnBeforePrint event of the MemoView I have the code:
MemoView1.Left := Page1.PaperWidth - Page1.RightMargin - MemoView1.Width;
but it does not place the object in the position I want, far to the right of the page. Any help would be mostly appreciated.
Kindest regards
Comments
I think you should put your code in an obp-event above the actual component. This might be in a band (if banded) og maybe the page.
Petter
Take a look at the attached report. The second memo is a moved by code.
I also think there are some conversion-issues in your code. The paperwidth and rigthmargin must be converted from mm to pixels:
MemoView1.Left := ((Page1.PaperWidth - Page1.RightMargin) * fr01cm) - MemoView1.Width;
Petter