Procedure

TfrmOptionsLists.btnListAddClick

Module

fOptionsLists

Last Modified

7/15/2014 3:26:40 PM

Visibility

Public/Published

Owner

TfrmOptionsLists

Declaration

procedure btnListAddClick(Sender: TObject);

Calls Hierarchy


TfrmOptionsLists.btnListAddClick
 ├TfrmOptionsLists.AddIfUnique
 ├TfrmOptionsLists.lstListPatsChange
 └TfrmOptionsLists.lstPersonalPatientsChange

Calls

Name Declaration Comments
TfrmOptionsLists.AddIfUnique procedure AddIfUnique(entry: string; aList: TORListBox); -
TfrmOptionsLists.lstListPatsChange procedure lstListPatsChange(Sender: TObject); -
TfrmOptionsLists.lstPersonalPatientsChange procedure lstPersonalPatientsChange(Sender: TObject); -


Source

457   procedure TfrmOptionsLists.btnListAddClick(Sender: TObject);
458   var
459     i: integer;
460   begin
461     if not btnListAdd.Enabled then exit;
462     with lstPersonalPatients do
463     begin
464       if Items.Count = 1 then
465         if Piece(Items[0], '^', 1) = '' then
466           Items.Clear;
467     end;
468     with lstListPats do
469     for i := Items.Count - 1 downto 0 do
470       if Selected[i] then
471       begin
472         AddIfUnique(Items[i], lstPersonalPatients);
473         Items.Delete(i);
474       end;
475     lstListPatsChange(self);
476     lstPersonalPatientsChange(self);
477     btnListSaveChanges.Enabled := true;
478   end;