Sida 1 av 3
TbitBtn
OBS! Egenskapen ”Kind” skall sättas genom att man klickar på
knappen . Se kod nedan…
Sida 2 av 3
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
Buttons, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm) BitBtn1: TBitBtn;
BitBtn10: TBitBtn;
BitBtn11: TBitBtn;
BitBtn12: TBitBtn;
BitBtn13: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
BitBtn4: TBitBtn;
BitBtn5: TBitBtn;
BitBtn6: TBitBtn;
BitBtn7: TBitBtn;
BitBtn8: TBitBtn;
BitBtn9: TBitBtn;
Button1: TButton;
Label1: TLabel;
Label10: TLabel;
Label11: TLabel;
Label12: TLabel;
Label13: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
Label8: TLabel;
Label9: TLabel;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ private declarations } public
{ public declarations } end;
var
Form1: TForm1;
implementation
Sida 3 av 3
{ TForm1 }
procedure TForm1.FormCreate(Sender: TObject);
begin
Form1.Caption := Application.Title;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
//--- Knappar ---
BitBtn1.Kind := bkAbort;
BitBtn2.Kind := bkAll;
BitBtn3.Kind := bkCancel;
BitBtn4.Kind := bkClose;
BitBtn5.Kind := bkCustom;
BitBtn6.Kind := bkHelp;
BitBtn7.Kind := bkIgnore;
BitBtn8.Kind := bkNo;
BitBtn9.Kind := bkNoToAll;
BitBtn10.Kind := bkOK;
BitBtn11.Kind := bkRetry;
BitBtn12.Kind := bkYes;
BitBtn13.Kind := bkYesToAll;
//--- Etiketter ---
Label1.Caption := 'bkAbort';
Label2.Caption := 'bkAll';
Label3.Caption := 'bkCancel';
Label4.Caption := 'bkClose';
Label5.Caption := 'bkCustom';
Label6.Caption := 'bkHelp';
Label7.Caption := 'bkIgnore';
Label8.Caption := 'bkNo';
Label9.Caption := 'bkNoToAll';
Label10.Caption := 'bkOK';
Label11.Caption := 'bkRetry';
Label12.Caption := 'bkYes';
Label13.Caption := 'bkYesToAll';
end;
initialization {$I unit1.lrs}
end.