unit Unit5;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls;
type
TForm5 = class(TForm)
PageControl1: TPageControl;
procedure FormCreate(Sender: TObject);
private
{ Private-Deklarationen }
procedure Myclick (Sender: TObject);
public
end;
var
Form5: TForm5;
implementation
{$R *.DFM}
procedure TForm5.Myclick(Sender: TObject);
begin
case TTabsheet(Sender).Tag of
0 : ShowMessage('Jawoll');
1 : ShowMessage('jawoll1');
end;
end;
procedure TForm5.FormCreate(Sender: TObject);
var
i: integer;
begin
PageControl1.MultiLine := True;
with PageControl1 do
for i := 0 to 12 do
with TTabSheet.Create(Self) do
begin
PageControl := PageControl1;
Caption := IntToStr(i);
Tag := i;
onClick := Myclick;
case i of
0 : Caption :='Einleitung';
1 : Caption :='Gerechtigkeitsstreben';
2 : Caption :='Kampfbereitschaft';
3 : Caption :='Sicherheitsstreben';
4 : Caption :='Harmoniebedürfnis';
5 : Caption :='Fröhlichkeit';
6 : Caption :='Fremdbestimmung';
7 : Caption :='Sentimentalität';
8 : Caption :='Hilfsbereitschaft';
9 : Caption :='Intellektualität';
10 : Caption :='Erfolgswille';
11 : Caption :='Sensibilität';
12 : Caption :='Selbstbestimmung';
end;
end;
end;
end.