Changeset 51 for trunk/Packages/Common/UListViewSort.pas
- Timestamp:
- Dec 20, 2021, 6:45:12 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UListViewSort.pas
r38 r51 1 1 unit UListViewSort; 2 2 3 // Date: 201 0-11-033 // Date: 2019-05-17 4 4 5 5 {$mode delphi} … … 8 8 9 9 uses 10 {$IFDEF Windows}Windows, CommCtrl, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils,10 {$IFDEF Windows}Windows, CommCtrl, LMessages, {$ENDIF}Classes, Graphics, ComCtrls, SysUtils, 11 11 Controls, DateUtils, Dialogs, fgl, Forms, Grids, StdCtrls, ExtCtrls, 12 LclIntf, L Messages, LclType, LResources;12 LclIntf, LclType, LResources; 13 13 14 14 type … … 81 81 FOnChange: TNotifyEvent; 82 82 FStringGrid1: TStringGrid; 83 procedure DoOnChange; 83 84 procedure GridDoOnKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 84 85 procedure GridDoOnResize(Sender: TObject); … … 90 91 function TextEnteredColumn(Index: Integer): Boolean; 91 92 function GetColValue(Index: Integer): string; 93 procedure Reset; 92 94 property StringGrid: TStringGrid read FStringGrid1 write FStringGrid1; 93 95 published … … 152 154 { TListViewFilter } 153 155 156 procedure TListViewFilter.DoOnChange; 157 begin 158 if Assigned(FOnChange) then FOnChange(Self); 159 end; 160 154 161 procedure TListViewFilter.GridDoOnKeyUp(Sender: TObject; var Key: Word; 155 162 Shift: TShiftState); 156 163 begin 157 if Assigned(FOnChange) then 158 FOnChange(Self); 164 DoOnChange; 159 165 end; 160 166 … … 227 233 Result := StringGrid.Cells[Index, 0] 228 234 else Result := ''; 235 end; 236 237 procedure TListViewFilter.Reset; 238 var 239 I: Integer; 240 begin 241 with StringGrid do 242 for I := 0 to ColCount - 1 do 243 Cells[I, 0] := ''; 244 DoOnChange; 229 245 end; 230 246
Note:
See TracChangeset
for help on using the changeset viewer.