Manually align object

johnnixjohnnix Serrai, Greece
edited 7:10PM in FastReport 4.0
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

Comments

  • edited 7:10PM
    johnnix wrote: »
    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 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
  • edited 7:10PM
    gavind wrote: »
    Tried it but still no luck. Any ideas out there please?

    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

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.