Changeset 17 for trunk/Packages
- Timestamp:
- May 4, 2016, 12:12:25 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UListViewSort.pas
r3 r17 73 73 procedure UpdateFromListView(ListView: TListView); 74 74 function TextEntered: Boolean; 75 function TextEnteredCount: Integer; 75 76 function TextEnteredColumn(Index: Integer): Boolean; 76 77 function GetColValue(Index: Integer): string; … … 120 121 var 121 122 I: Integer; 122 NewColumn: TGridColumn;123 123 begin 124 124 with FStringGrid1 do begin 125 Columns.Clear;125 //Columns.Clear; 126 126 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; 128 128 for I := 0 to ListView.Columns.Count - 1 do begin 129 129 Columns[I].Width := ListView.Columns[I].Width; … … 133 133 134 134 function TListViewFilter.TextEntered: Boolean; 135 begin 136 Result := TextEnteredCount > 0; 137 end; 138 139 function TListViewFilter.TextEnteredCount: Integer; 135 140 var 136 141 I: Integer; 137 142 begin 138 Result := False;143 Result := 0; 139 144 for I := 0 to FStringGrid1.ColCount - 1 do begin 140 145 if FStringGrid1.Cells[I, 0] <> '' then begin 141 Result := True; 142 Break; 146 Inc(Result); 143 147 end; 144 148 end;
Note:
See TracChangeset
for help on using the changeset viewer.