unit FindPref;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TFindPrefix = class(TForm)
    Label1: TLabel;
    PrefixEdit: TEdit;
    OkButton: TButton;
    Button2: TButton;
    procedure PrefixEditChange(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FindPrefix: TFindPrefix;

implementation

{$R *.DFM}

procedure TFindPrefix.PrefixEditChange(Sender: TObject);
var
  OldSel: Integer;
begin
  with PrefixEdit do
  begin
    OldSel:=SelStart;
    Text:=LowerCase(Text);
    SelStart:=OldSel;
  end;
  OkButton.Enabled:=Length(PrefixEdit.Text)=3;
end;

end.
