unit alphabettest;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs,TAlphabetBar;

type
  TForm1 = class(TForm)
    procedure FormActivate(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure testkey(Sender: TObject;key : Word);
  private
    { Private declarations }
  public
    { Public declarations }

  end;

var
  Form1: TForm1;
    ab : TAlphabar;

implementation

{$R *.dfm}



procedure TForm1.FormActivate(Sender: TObject);
begin
ab:=TAlphabar.Create(self);
ab.top:=0;
ab.height:=40;
ab.OnVirtualKey:=testkey;
ab.Font.color:=clred;
end;

procedure TForm1.FormResize(Sender: TObject);
begin
ab.Width:=clientrect.right;
end;

procedure TForm1.testkey(Sender: TObject; key: Word);
begin
  windows.Beep(key*100,200)
end;

end.