trichview.com

trichview.support




Delete control by code


Return to index


Author

Message

Christian Kirchhoff

Posted: 01/10/2003 21:54:01


Hello,


The only way I could think of to delete a control inserted in a TRichViewEdit

seems to be the DeleteItems procedure, but I receive an exception if I try

to do that.

Is DeleteItems not allowed for controls?


I would need that first of all in order to let the user delete a control

by choosing a command in a popup menu (and not only by moving the caret to

the right of the control and pressing BACKSPACE).

Second, I would like to implement my own Drag&Drop of controls inside the

RichViewEditor. While dragging the control, I move the caret to the actual

mosue position inside the RichViewEditor. In the OnDragDrop event I have

the dragged control as the parameter "Source". I don't think it is possible

to move controls or other items directly from on position to another, so

what I would do is create a new control of the same type, assign the "Source"

to it in order to make a copy, delete the original control out of the RichViewEditor

and insert the new control at the current position of the caret.

But if deleting controls with code does not work there seems to be nothing

I could do.

Does anyone have an idea?


Regards,


Christian Kirchhoff





Powered by ABC Amber Outlook Express Converter