Doing selection within table cells
Posted: Mon Sep 05, 2005 7:22 am
Hi,
I want to be able to delete a part of a document between two controls I've added into the document. This part is an optional part of the document, so I've got to be able to switch it off.
If the optional part is not in a table, I've got it working. But it is also possible that an optional part of a document is in a cell of a table. How can I do a selection of that part (SetSelectionBounds) where after I can possible delete it.
My strategy is first to iterate over all the items with EnuItems. When I encounter the starting and closing control, I save their ItemNo (lStart and lEnd) and use them to do a SetSelectionBounds and deleting the selection:
As I said, this works fine out of a table. In a cell of a table I seem to get ItemNo's of an inplace editor (the are much to low), but how can I get to that Inplace editor while being outside the table, to do the SetSelectionBounds and deleting?
Thanks
I want to be able to delete a part of a document between two controls I've added into the document. This part is an optional part of the document, so I've got to be able to switch it off.
If the optional part is not in a table, I've got it working. But it is also possible that an optional part of a document is in a cell of a table. How can I do a selection of that part (SetSelectionBounds) where after I can possible delete it.
My strategy is first to iterate over all the items with EnuItems. When I encounter the starting and closing control, I save their ItemNo (lStart and lEnd) and use them to do a SetSelectionBounds and deleting the selection:
Code: Select all
lRichView.SetSelectionBounds(lStart, 0, lEnd, 1);
...
lRichView.DeleteSelection;
lRichView.Format;
Thanks