trichview.com

trichview.support




Delete table


Return to index


Author

Message

zet

Posted: 09/29/2003 14:13:57


Hello


Assume, we have such text in TrichViewEdit:


Line1

-----------

| table   |

-----------

Line2


I'm trying to delete a table (which I've inserted earlier) with a

following code:


  rv.SetSelectionBounds(a, rv.GetOffsBeforeItem(a), a,

rv.GetOffsAfterItem(a));

  rv.ReadOnly:=false;

  rv.DeleteSelection;

  rv.ReadOnly:=true;


It works, but leaves an empty line after delete, which I don't want to have:

Line1


Line2


Also I've tried to use next code:


a:=n-1;

b:=n+1;

rv.SetSelectionBounds(a, rv.GetOffsAfterItem(a), b,

rv.GetOffsBeforeItem(b));

//delete


But it also has a problem:

Line1Line


That's what I've got.


How should I delete it, to get just

Line1

Line2

?





Powered by ABC Amber Outlook Express Converter