trichview.com

trichview.support




Re: Using demo Checkpoints 3


Return to index


Author

Message

Sergey Tkachenko

Posted: 06/04/2005 16:25:37


var CheckpointIndex, ItemNo: Integer;

      CheckpointData: TCheckpointData;

begin

  // deleting checkpount

  CheckpointIndex := ListBox1.ItemIndex;

  if CheckpointIndex=-1 then exit;

  CheckpointData := RichView1.GetCheckpointByNo(CheckpointIndex);

  ItemNo := RichView1.GetCheckpointItemNo(CheckpointData);

  RichView1.RemoveCheckPoint(ItemNo);

  // deleting from listbox

  ListBox1.Items.Delete(CheckpointIndex);

  // restoring listbox selection

  if CheckpointIndex>=ListBox1.Items.Count then

    dec(CheckpointIndex);

  if CheckpointIndex>=0 then

    ListBox1.ItemIndex := CheckpointIndex;

end;



>

> Hello Sergey I tried this code... it succeeds in removing the checkpoint

but

> it does not remove it from the ListBox below which I put the 'delete

button'

> in "CPFrm", How do I get it to remove the reference to the checkpoint from

> the ListBox1 as well ?

>

> Richard





Powered by ABC Amber Outlook Express Converter