Changing text in several boxes at the same time during preview

Hi

I want to change more than one text when I let the user change a text when in preview mode.

I have my own dialog box for editing the text and it works very well for the current box when I click it,

but I want to add the same text (on a different page) to another box.

FindComponent finds the second box, but it's not updating the text.

Is this possible to do at all?


function TdmOavtale.FindMemo(AMemo : string; ARapport: TfrxReport): TfrxMemoView;

begin

 Result := TfrxMemoView(ARapport.FindComponent(AMemo));

end;


procedure TdmOavtale.frxOavtaleDblClickObject(Sender: TfrxView;

 Button: TMouseButton; Shift: TShiftState; var Modified: Boolean);

var

 x : TfrxMemoView;

 s : string;

begin

 if Sender.ClassName='TfrxMemoView' then

 begin

   x := (Sender as TfrxMemoView);

   if (x.Name<>'AvtOC1') and (x.Name<>'txtIfNo') then

   begin

     s := x.Text;

     if DlgInputMemo('Edit text','Text',s) then

     begin

      x.Text  := s;

      Modified := True;

     end;

     if x.Name='txtNameOA' then

     begin

       x := FindMemo('txtNameFA',FRapport);

       if Assigned(x) then

       x.Text := s; // The box is found and the text changes, but not the report in preview mode

     end;

   end;

 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.