How to change the text of a memo by click/dblclick ?

edited October 2015 in FastReport .NET
Hey together,

I have to change the text of a TextObject by using the click-event and a dialog.

In FastReport 4.0 (*.fr3) I solved the Problem by using the Delphi script >  and user function for the Dialog
procedure MemoOnDblClick(Sender: TfrxView; Button: TMouseButton; Shift: Integer; var Modified: Boolean);
...
begin
  ....    
  Answer := CallEditDialog(...);
  ...
  if(Answer <>'<<NULL>>') then begin                                          
       TfrxMemoView(Sender).Text :=Answer;
       Modified := true;           
  end;            
end;

CallEditDialog is an user function which open a dialog and ask for the new text.

Comments

  • edited October 2015
    Problem found... Problem solved >
    private void StringObject_Click(object sender, EventArgs e)
        {
            TextObject _SenderObject = (Report.FindObject((sender as TextObject).Name))as TextObject;
    
            //call Userfunction, asking for the new text
            _SenderObject.Text = _SenderObject.Text + "*";
    
            Report.Refresh();
        }
    

    Every TextObjects are getting the same Click-Event-Function StringObject_Click


    That's it [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Searching the next Problem[/img]>

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.