mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-02 19:24:46 +01:00
Streamline code for FilterEdits and their example project.
This commit is contained in:
parent
4c822bb36e
commit
5a269b8bc4
@ -85,6 +85,9 @@
|
||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<DebugInfoType Value="dsDwarf3"/>
|
||||
</Debugging>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
|
||||
@ -96,14 +96,11 @@ end;
|
||||
|
||||
procedure TListViewFilterForm.FormCreate(Sender: TObject);
|
||||
begin
|
||||
ListView1.BeginUpdate;
|
||||
AddLVItem('String1', 'String2');
|
||||
AddLVItem('String3', 'String4');
|
||||
AddLVItem('A String', 'another String');
|
||||
AddLVItem('x string', 'Extra String');
|
||||
ListViewFilterEdit1.InvalidateFilter;
|
||||
ListViewFilterEdit1.ResetFilter;
|
||||
ListView1.EndUpdate;
|
||||
end;
|
||||
|
||||
procedure TListViewFilterForm.ButtonProgramClick(Sender: TObject);
|
||||
|
||||
@ -1187,10 +1187,7 @@ end;
|
||||
procedure TCustomControlFilterEdit.SetFilter(const AValue: string);
|
||||
begin
|
||||
if Text=AValue then Exit;
|
||||
Text:=AValue;
|
||||
Button.Enabled:=AValue<>'';
|
||||
fFilterLowercase:=UTF8LowerCase(AValue);
|
||||
InvalidateFilter;
|
||||
Text:=AValue; // ActivateFilter will be called by EditChange handler.
|
||||
end;
|
||||
|
||||
procedure TCustomControlFilterEdit.SetFilterOptions(AValue: TFilterStringOptions);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user