trichview.com

trichview.support




Re: How do I delete an item in TRichViewEdit?


Return to index


Author

Message

Sergey Tkachenko

Posted: 05/28/2004 16:12:45


If this will be a editing operation (which can be undone and redone), you

can call

  rve.SetSelectionBounds(ItemNo, rve.GetOffsBeforeItem(ItemNo),

    ItemNo, rve.GetOffsAfterItem(ItemNo));

  rve.DeleteSelection;



About DeleteItems

- you need to call Format after DeleteItems before displaying document or

before calling any method for editing;

- it's a dangerous method, it can create invalid documents if used

improperly (see "Valid Documents" topic in the help file)



> It's not absolutely necessary, but if it's not too complicated, I could

> make it undoable. I did find:

>

> DeleteItems(ItemNo, 1)

>

> which works fine, but if I don't call Format immediately afterwards I

> get a list item bounds error if I try to access another item

> subsequently. Would DeleteItems be the right approach, or is there a

> better one?

>

> Cheers,

> Martin

>

> Sergey Tkachenko wrote:

> > Should this operation be undoable?

> >

> >

> >

> >>Given that I know the item number, how do I delete an item from the text

> >>  in a TRichViewEdit?

> >>

> >>Cheers,

> >>Martin

> >

> >

> >





Powered by ABC Amber Outlook Express Converter