trichview.com

trichview.support




Re: About the SaveIni and the DeleteUnusedStyles


Return to index


Author

Message

Sergey Tkachenko

Posted: 07/29/2002 21:36:20


1) Try the simple program


procedure TForm1.FormCreate(Sender: TObject);

var i: Integer;

begin

  for i := 0 to RVStyle1.TextStyles.Count-1 do

    RVStyle1.TextStyles[i].Standard := False;

end;


procedure TForm1.Button1Click(Sender: TObject);

var c1,c2: Integer;

begin

  c1 := RVStyle1.TextStyles.Count;

  RichViewEdit1.DeleteUnusedStyles(True,True);

  c2 := RVStyle1.TextStyles.Count;

  Caption := IntToStr(c1-c2);

end;


When clicking Button1, form caption is changed to 5, because 5 styles were

deleted.

(current style is not deleted, even if it is not used)


2) Do not use DeleteTextStyle. It had sence in very old version of RichView.

Use RVStyle.TextStyles.Delete




> No, it really doesn't work. Each time I create a Style, I assign the

> property Standart a value False. But, when I call DeleteUnusedStyles it

does

> not delete the unused styles. Please try it yourself and you will see that

> it doesn't work... Or at least, it doesn't work with me.

> And also, DeleteTextStyle() doesn't work. Please, write a program to check

> these issues and if they work, post the code to see where my mistake is

>  though I don't believe I have made a mistake, since it's only one row of

> code :) ).

>

> Slavi

>

> "Sergey Tkachenko" <[email protected]> wrote in message

> news:[email protected]...

> > DeleteUnusedStyles deletes only styles with property Standard=False.

> >

> >

>

>

>

>





Powered by ABC Amber Outlook Express Converter