Page 1 of 1

How to delete a checkpoint

Posted: Tue Apr 14, 2009 4:04 pm
by mihoum
I try to use the RemoveCheckpoint method and doesn't work for me.
I have added a “Delete checkpoint” button in your demo project Tutorial_2_3 under the listbox with checkpoints.
There is code Onclick for this button:
srv.RichViewEdit.RemoveCheckPoint(ListBox1.ItemIndex);
It does nothing. The checkpoint stays as is, I can go to it again.

Thanks.

Posted: Tue Apr 14, 2009 6:25 pm
by Sergey Tkachenko
RemoveCheckPoint wants an index of an item containing the checkpoint.
ListBox1.ItemIndex is an index of the checkpoint itself, not of its item.
The following code must work:

Code: Select all

with srv.RichViewEdit do
  RemoveCheckPoint(GetCheckpointItemNo(GetCheckpointByNo(ListBox1.ItemIndex)));

Posted: Tue Apr 14, 2009 6:42 pm
by mihoum
It works.

Thank you.