Load styles from ini witout deleting existing styles?

General TRichView support forum. Please post your questions here
Post Reply
Usch Wildt
Posts: 20
Joined: Fri Sep 29, 2006 11:30 am

Load styles from ini witout deleting existing styles?

Post by Usch Wildt »

Hi,

I developed an application where users can generate text modules and build together documents from several of these text modules.
Now I would like add a possibility for the users to configure some standard styles, e.g. one for "normal text", one for "heading", one "standard list" (they shall not be able to generate new standard styles).
When the user changes one of these standard styles, the existing text modules shall change: the text parts that use the standard style shall change to the new appearance.
I tried to to assign the changed styles with LoadIni, which is fine, if the text module uses only the standard formats. But if the user formatted some text parts individually, these individual styles vanish when I call LoadIni.
Is there a possibility to merge the styles: substitute existing styles by the ones from the ini file, but keep the others?

Thanks for help,

Usch
Sergey Tkachenko
Site Admin
Posts: 17565
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Load INI in another RVStyle, then copy styles:

Code: Select all

for i := 0 to RVStyle2.TextStyles.Count-1 do
  RVStyle1.TextStyles[i].Assign(RVStyle2.TextStyles[i]);
Post Reply