unit BuscaCliente;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, Grids, DBGrids, ExtCtrls;

type
  TFmBuscaCli = class(TForm)
    PnGrid: TPanel;
    DBGrid1: TDBGrid;
    PnEntrada: TPanel;
    Label1: TLabel;
    Edit1: TEdit;
    BitBtn1: TBitBtn;
    PnTitulo: TPanel;
    procedure Edit1Change(Sender: TObject);
    procedure Edit1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FmBuscaCli: TFmBuscaCli;

implementation
        uses base;
{$R *.DFM}

procedure TFmBuscaCli.Edit1Change(Sender: TObject);
begin
    dados.TbClientes.FindNearest([edit1.text]);
end;

procedure TFmBuscaCli.Edit1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
     if Key=38 then dados.TbClientes.Prior;
     if Key=40 then dados.TbClientes.Next;

end;

procedure TFmBuscaCli.BitBtn1Click(Sender: TObject);
begin
        Close;
end;

end.
