trichview.com

trichview.support




Re: Deleting an item safely (2)


Return to index


Author

Message

Martin Holmes

Posted: 08/25/2004 15:09:06


Finally figured it out! The item style includes rvprModifyProtect and

rvprDeleteProtect; I had assumed these would prevent the user from

deleting the text, but not prevent me from deleting it in code, but it

turns out that I have to change the style before I can successfully delete.


Thanks for all your help as always.


Martin


Sergey Tkachenko wrote:

> TCustomRVFormattedData is derived from TCustomRVData.

> All classes of RichView objects are derived from TCustomRVFormattedData.

> So you can safely typecast any RVData to TCustomRVFormattedData.

>

> As for text deletion - call RichViewEdit1.DeleteSelection.

> It deletes selected fragment regardless of its location (assuming that it is

> in edited RVData, and it's provided by RVData := RVData.Edit)

>

>

>>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.

>

>

>





Powered by ABC Amber Outlook Express Converter