A TextStyle question

General TRichView support forum. Please post your questions here
Post Reply
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

A TextStyle question

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
jhonalone
Posts: 31
Joined: Mon Apr 07, 2008 5:59 pm
Location: Madrid

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17253
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

I am afraid I do not understand your explanation.
May be you can make a simple project reproducing this problem?
Post Reply