Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TAsSearchBox.Change;
- begin
- inherited;
- if Assigned(FdataSet) and FdataSet.Active and (LoadFilter(Self.Text) <> '') and (FSearchActive) then begin
- with FdataSet do begin
- Filtered := false;
- if Self.GetTextLen <> 0 then begin
- try
- if not FsearchOptions.FCaseSensitive then
- FilterOptions := [foCaseInsensitive];
- Filter := LoadFilter(Self.Text);
- Filtered := True;
- if not(IsEmpty) then Color := FColorFound
- else Color := FColorNotFound;
- except
- Color := FColorNotFound;
- end;
- end else begin
- FdataSet.Filtered := false;
- Color := FNormalColor;
- end;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement