Changeset 17 for trunk/Packages


Ignore:
Timestamp:
May 4, 2016, 12:12:25 PM (9 years ago)
Author:
chronos
Message:
  • Added: Separate form for viewing all acronyms in list.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UListViewSort.pas

    r3 r17  
    7373    procedure UpdateFromListView(ListView: TListView);
    7474    function TextEntered: Boolean;
     75    function TextEnteredCount: Integer;
    7576    function TextEnteredColumn(Index: Integer): Boolean;
    7677    function GetColValue(Index: Integer): string;
     
    120121var
    121122  I: Integer;
    122   NewColumn: TGridColumn;
    123123begin
    124124  with FStringGrid1 do begin
    125     Columns.Clear;
     125    //Columns.Clear;
    126126    while Columns.Count > ListView.Columns.Count do Columns.Delete(Columns.Count - 1);
    127     while Columns.Count < ListView.Columns.Count do NewColumn := Columns.Add;
     127    while Columns.Count < ListView.Columns.Count do Columns.Add;
    128128    for I := 0 to ListView.Columns.Count - 1 do begin
    129129      Columns[I].Width := ListView.Columns[I].Width;
     
    133133
    134134function TListViewFilter.TextEntered: Boolean;
     135begin
     136  Result := TextEnteredCount > 0;
     137end;
     138
     139function TListViewFilter.TextEnteredCount: Integer;
    135140var
    136141  I: Integer;
    137142begin
    138   Result := False;
     143  Result := 0;
    139144  for I := 0 to FStringGrid1.ColCount - 1 do begin
    140145    if FStringGrid1.Cells[I, 0] <> '' then begin
    141       Result := True;
    142       Break;
     146      Inc(Result);
    143147    end;
    144148  end;
Note: See TracChangeset for help on using the changeset viewer.