TFrxRichView Editor

edited 2:25PM in FastReport 3.0
Hello [img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> How can I enable in my application the TFrxRichView Editor. I'd like to give possibility at runtime to edit document before printing. I mostly need the buttons (Add Expression, Open File). I'm using Delphi 7 and Fast Report 3. Thanks in advance[/img][img]style_emoticons/<#EMO_DIR#>/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> MarcoL[/img]

Comments

  • gpigpi
    edited 2:25PM
    Try
    uses frxRich, frxRichEditor, frxDesgn;
    procedure TForm1.frxReport1ClickObject(Sender: TfrxView;
      Button: TMouseButton; Shift: TShiftState; var Modified: Boolean);
    begin
      if Sender is TfrxRichView then
        with TfrxRichEditorForm.Create(Form1) do
          begin
            RichView := TfrxRichView(Sender);
            Modified := ShowModal = mrOk;
            Free;
          end;
    end;
    
  • edited 2:25PM
    Hello

    Thanks a lot. It works.
    Now, I can edit, load and save text at runtime.

    But it still doesn't work a Add Expression button. I need it because user can't choose and add dataset fields to text. When I click this button in the Rich Editor Form I get a message ACCESS VIOLATION. If it's not a problem for you please help me.


    So far I put TFrxRichView inside TFrxMasterData, TFrxMasterData is connected with TFrxDBDataset by TFrxMasterData.Dataset and I put your code in frxReport1ClickObject()


    Greetings,

    Marcol
  • gpigpi
    edited 2:25PM
    Try
    frxReport1.DesignReportInPanel(Panel1);
         with TfrxRichEditorForm.Create(TfrxDesignerForm(frxReport1.Designer)) do
          begin
            RichView := TfrxRichView(frxReport1.FindObject('Rich1'));
            ShowModal;
            frxReport1.Designer.Close;
            Free;
          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.