Page 1 of 1

A TextStyle question

Posted: Fri Jan 01, 2010 11:51 pm
by jhonalone
I have a RichView Editor working well.
If I change any properties at RVStyle in one defined TextStyles TFontInfo, then when I read a RVF (saved before) I cann't use the changed TFontInfo text.
I DeleteUnUsedStyles(true,true,true) before save document.
I do not used this text style in saved document.
But when I try to use the modified text style on old saved document the editor assume the unexisting old text style before thet I saved the first time.

Sould to be the reason that I have rvfoSaveTextStyles and rvfoSaveParaStyles sets both at True, before I saved to it the first time?
How can I solve the problem?

Thanks for your help.

Posted: Sun Jan 03, 2010 5:29 pm
by Sergey Tkachenko
I do not understand you.
With the default settings, when you load RVF file, existing styles are removed from RVStyle and styles from RVF files are loaded.
So, if you stored indices of styles, they become invalid. But if you stored styles themselves in objects, they can be used even after loading.

Please explain what you want to implement, I'll try to help you.

Posted: Sun Jan 03, 2010 7:58 pm
by jhonalone
Well. I'll try to explain.
I've several RVF files saved on disk.

Now, I change on Delphi the predefined Style1.TextStyles[4], font size for example.

I never used this Style1.TextStyles[4] on document saved on RVF, before.

But if I read this RVF to the same editor, which have any Property of Style1.TextStyles[4] changed, when I want to use the Style1.TextStyles[4] into document, the text appear with old font size when I saved the first time not with new Font size changed today.

When I saved newly without changes and read again problem is solved.

I do not understand, why?

Posted: Mon Jan 04, 2010 7:48 pm
by Sergey Tkachenko
I am afraid I do not understand your explanation.
May be you can make a simple project reproducing this problem?