trichview.com

trichview.support




Re: What is the exact action of RVS.Textstyles.Delete(I)


Return to index


Author

Message

Slavi Marinov

Posted: 08/04/2002 21:47:51


Well, .TextStyles.Delete does NOT work with me, while .Free does, so I am

using it...... :)



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

news:[email protected]...

> Thanks, TW

>

> RVStyle.TextStyles[i].Free and RVS.Textstyles.Delete(I) are equivalent (in

> older version of Delphi, collections did not have method Delete).

> These operators deletes one collection item - one text style.

> Yes, if you want to delete 3rd and 5th style, you need to call

> RVS.Textstyles.Delete(3);

> RVS.Textstyles.Delete(4);

>

> (

> or it's easier to use reverse order

> RVS.Textstyles.Delete(5);

> RVS.Textstyles.Delete(3);

> )

>

> Note: RichView text items stores indices in the collection of text styles.

> If you'll delete some  text style, indices will not be adjusted.

>

> RichView.DeleteUnusedStyles deletes unused styles and adjusts indices in

the

> document.

>

>

>

> But method RVS.DeleteText styles is really obsolete.

>

>

> > delete is obsolete, you should use

> > RVStyle.TextStyles[i].Free instead.

> > TextStyles is a Tcollection (0-based) and textStyle inherits

> > from tcollectionItem which means the item-place

> > will be removed from collection and the item destroyed.

> >

> >

> >

> > > What is the exact action of RVS.Textstyles.Delete(I)?

> > > I mean, does it just delete the style from the stylelist, does it

shift

> > all

> > > the following styles by one... What does it do? Because it's not

> described

> > > in the Help.

> > > My question more particularly asked is :

> > > if i want to delete the 3rd and the 5th style, what do I use?

> > > RVS.Textstyles.Delete(3);

> > > RVS.Textstyles.Delete(5);

> > > or

> > > RVS.Textstyles.Delete(3);

> > > RVS.Textstyles.Delete(4);

> > > ?

> > >

> > > Slavi

> > >

> > >

> >

> >

>

>





Powered by ABC Amber Outlook Express Converter