Procedure

TfrmOptionsLists.AddIfUnique

Module

fOptionsLists

Last Modified

7/15/2014 3:26:40 PM

Visibility

Private

Owner

TfrmOptionsLists

Declaration

procedure AddIfUnique(entry: string; aList: TORListBox);

Called-By Hierarchy


         TfrmOptionsLists.AddIfUnique
     TfrmOptionsLists.lstAddByClick┤ 
TfrmOptionsLists.btnListAddAllClick┤ 
   TfrmOptionsLists.btnListAddClick┘ 

Called-By

Name Declaration Comments
TfrmOptionsLists.btnListAddAllClick procedure btnListAddAllClick(Sender: TObject); -
TfrmOptionsLists.btnListAddClick procedure btnListAddClick(Sender: TObject); -
TfrmOptionsLists.lstAddByClick procedure lstAddByClick(Sender: TObject); -


Source

193   procedure TfrmOptionsLists.AddIfUnique(entry: string; aList: TORListBox);
194   var
195     i: integer;
196     ien: string;
197     inlist: boolean;
198   begin
199     ien := Piece(entry, '^', 1);
200     inlist := false;
201     with aList do
202     for i := 0 to Items.Count - 1 do
203       if ien = Piece(Items[i], '^', 1) then
204       begin
205         inlist := true;
206         break;
207       end;
208     if not inlist then
209       aList.Items.Add(entry);
210   end;