trichview.com

trichview.support




Re: Deleting an item safely (2)


Return to index


Author

Message

Martin Holmes

Posted: 08/24/2004 15:35:05


I think my problems are something to do with the difference between

TCustomRVData and TCustomRVFormattedData. The pointer I have to the

RVData is a TCustomRVData; however, SetSelectionBounds seems to be a

method of TCustomRVFormattedData. Could you explain the difference? I

can cast RVData to a TCustomRVFormattedData, but the SetSelection

doesn't seem to work.


Thanks,

Martin



Sergey Tkachenko wrote:


> If this operation must be undone/redone, deletion must be done by selecting

> and calling DeleteSelection.

>

> If you have RVData and ItemNo (index of item inside this RVData), the code

> is:

>

> RVData := RVData.Edit;

> RVData.SetSelectionBounds(ItemNo, RVData.GetOffsBeforeItem(ItemNo),

>   ItemNo, RVData.GetOffsAfterItem(ItemNo));

> RichViewEdit1.DeleteSelection;

>

>





Powered by ABC Amber Outlook Express Converter