unit Unit5;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ComCtrls, StdCtrls;
type
TForm5 = class(TForm)
RichEdit1: TRichEdit;
Label1: TLabel;
PageControl1: TPageControl;
procedure FormCreate(Sender: TObject);
procedure Myclick (Sender: TObject);
private
{ Private-Deklarationen }
public
end;
var
Form5: TForm5;
implementation
{$R *.DFM}
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(Pages[i].TabIndex);
case Pages[i].Tabindex of
0 : begin
Caption :='Einleitung';
OnShow := Myclick;
Tag := 0;
end;
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;
procedure TForm5.Myclick (Sender: TObject);
begin
if Sender is TTabsheet then
case TTabsheet(Sender).Tag of
0 : ShowMessage('Jawoll');
end;
end;