Adjust memo width at runtime

Need help being able to adjust the width of a memo (text) at runtime. as you can see in the screen/form images below, depending on if the image is to be shown the memo.width needs to be adjusted. By default i have the memo set to the full width. how do i set this at runtime?

I have tried ( fr3x4BeforePrint, & fr3x4GetValue ) both methods:

Method 1: TfrxMemoView(fr3x4.FindObject('lblMaterial')).Width := 100;

Method 2: Var

   Memo1 :TfrxMemoView;

  Memo1 := fr3x4.FindObject('lblMaterial') as TfrxMemoView;

   Memo1.Width := 100;

But i get an error when trying to run the report

thanks,


Comments


  • This work for me. Set the Align property of the label ti baWidth. When the image on the right is visible the label stop there, when is not visible it use all the width of the band.

    Another way could be to use the script of FR, for example, using the OnBeforePrint event of the label itself, or the OnBeforePrint of the underlying band

  • Awesome! Thanks,

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.