Recent

Author Topic: RichMemo - changed event again  (Read 1922 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1009
RichMemo - changed event again
« on: July 13, 2023, 08:11:50 pm »
If a RichMemo is changed, then the OnChange-event fires. (this sets some parameters of mine)

This is SOLVED:
In my FormCreate event a certain Richmemo is loaded, I set my vars to "saved" before, -  to avoid annoying questions. The loading of the Richmemo triggers the OnChange-event again, which is obvious, because the loading is a change.
For the RichMemo. WE know, that we only loaded an existing file.
So the Richmemo thinks itsself changed, although we know it better because an existing file is saved already.
This I solve by setting it to "saved" again in Form's onShow-event. (thank you for the hint!)

So my RichMemo is displayed without stupid questions and the next Richmemo can be opened again without stupid questions.

UNSOLVED:
I open a Richmemo (by displaying it the change-event fires, what is logic).
I do not touch it! and I open the next Richmemo.
- NOW the stupid question is on: "you like to save me?"
For the RichMemo the loading of the second one was a change. WE know, both files were saved.

So my question is:
How can I set it to "saved" on opening an existing RichMemo?
The moment it is displayed causes the change-event to be fired.
And Richmemo has not onShow event to set it back.

Thanks to everybody who read it.

 

TinyPortal © 2005-2018