Procedure

TfrmODAllergy.btnRemoveClick

Module

fODAllgy

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmODAllergy

Declaration

procedure btnRemoveClick(Sender: TObject);


Source

454   procedure TfrmODAllergy.btnRemoveClick(Sender: TObject);
455   var
456     i: integer;
457   begin
458     inherited;
459     with lstSelectedSymptoms do
460       begin
461         if (Items.Count = 0) or (ItemIndex = -1) then exit;
462         i := ItemIndex;
463         Items.Delete(ItemIndex);
464         ItemIndex := i - 1;
465         if (Items.Count > 0) and (ItemIndex = -1) then ItemIndex := 0;
466       end;
467   end;