How to change a Memo.text

edited 9:17AM in FastReport 4.0
I try to change a value of a memo.... [img]style_emoticons/<#EMO_DIR#>/cool.gif" style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> I've a picture with a OnClick-Event at a fastreport page. At this event I want to read out any values of a ini-File to show them in a memo.text To read out the ini-file isn't a problem.[/img][img]style_emoticons/<#EMO_DIR#>/laugh.gif" style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> Also to assign the value to the memo is running[/img]
Memo3.Text := Ini.ReadString('MEMO_'+dlgComboBox01_cmbSelection.Text,'Memo3.Text','');
ShowMessage(Memo3.Text);
<<== Answer is OK

At the Fast-Report-Page there isn't any effects shown. It shows the old value [img]style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":unsure:" border="0" alt="unsure.gif" /> At an other test I use also[/img]
Report.ShowReport;
// <== access violation 4002E866 + 00A rtl70.bpl , TList.GetItems

It changes the values at the report page but an access violation is also shown.

TfrxMemoView(Memo3).Text:='Hello World';
TfrxMemoView(ReportTitle1.FindObject('Memo3')).Text:='Hallo Du da';

Don't give a better result.

Who know an solution to change values of a memo.text, memo.hint and a memo.descrition while the preview and by using somethink like a button-press

Thank in advance :lol:" border="0" alt="laugh.gif" />" alt=">" />

Comments

  • Anu de DeusAnu de Deus Hampshire, UK
    edited 9:17AM
    There's a demo for that, at least to change the text value, I don't think it's possible to change the description or the hint of the object in the preview window, as you don't get a valid/direct handle to the objects (hence the exceptions you are getting).
    See the Interactive report demo.
  • edited 9:17AM
    There's a demo for that, at least to change the text value, I don't think it's possible to change the description or the hint of the object in the preview window, as you don't get a valid/direct handle to the objects (hence the exceptions you are getting).
    See the Interactive report demo.


    [img]style_emoticons/<#EMO_DIR#>/huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> ==> At the demo you called, I've the same effect. OK, you are able to change the Value of the[/img]sender but not of an other memo then the sender. This is my probleme to solve.
    .....
     TfrxMemoView(Sender).Text := InputBox('Edit', 'Edit Memo2 text:', s);  //Memo2 is the sender
     Memo1.Text:= Memo2.Text;          // <== I need to change the value of Memo1 also!!!
     Modified := True;
    .....
    
  • edited 9:17AM
    Probleme solved!!!!! [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> I changed[/img]Modified := true;
    to
    Modified := false;
    It's running now..

    Solution:
    ....
    Memo3.Text := Ini.ReadString('MEMO_'+dlgComboBox01_cmbSelection.Text,'Memo3.Text','');
    Memo3.Hint := Ini.ReadString('MEMO_'+dlgComboBox01_cmbSelection.Text,'Memo3.Hint','');
    Memo3.Description := Ini.ReadString('MEMO_'+dlgComboBox01_cmbSelection.Text,'Memo3.Description','');                                    
      
    MemoName:='Memo50';                          
    TfrxMemoView(ReportTitle1.FindObject(MemoName)).Text:='Hallo Du da';                                       
        
    Report.ShowReport;                                                                      
    Modified := false;
    ....
    

    It's used for changing the report-language dynamicly

    Thanks for your interest and support

    Best regard.....

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.