extend with more controls to test painting interactions

git-svn-id: trunk@6203 -
This commit is contained in:
micha 2004-11-05 10:47:57 +00:00
parent 7f9d5da0ad
commit ea58339ac8
2 changed files with 92 additions and 2 deletions

View File

@ -98,7 +98,7 @@ procedure TForm1.LoadMainMenu;
begin
{ set the height and width }
Height := 350;
Width := 700;
Width := 350;
{ Create a groupbox }
grpTst := TGroupBox.Create(Self);
@ -117,6 +117,15 @@ begin
begin
Button2 := TButton.Create(grpTst);
Button2.Parent := grpTst;
Checkbox1 := TCheckBox.Create(grpTst);
Checkbox1.Parent := grpTst;
Checkbox1.Name:='Checkbox1';
Checkbox1.Left := 200;
Checkbox1.Top := 100;
Checkbox1.Width := 80;
Checkbox1.Height := 30;
Checkbox1.Caption := 'Checkbox 1';
end
else begin
Button2 := TButton.Create(Self);

View File

@ -25,7 +25,7 @@ unit notebku;
interface
uses Classes, SysUtils, Controls, Forms, ExtCtrls, Buttons;
uses Classes, SysUtils, Controls, Forms, ExtCtrls, Buttons, StdCtrls;
type
TForm1 = class(TForm)
@ -40,6 +40,11 @@ type
fButton4: TButton;
fButton5: TButton;
fButton6: TButton;
FRadButton: TRadioButton;
FCheckBox: TCheckBox;
FComboBox: TComboBox;
FLabel: TLabel;
FGroupbox1, FGroupbox2: TGroupBox;
constructor Create(AOwner: TComponent); override;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
@ -141,6 +146,79 @@ begin
Show;
end;
fGroupBox1 := TGroupBox.Create(Self);
with fGroupBox1 do
begin
Parent := fNotebk.Page[0];
Width := 250;
Height := 250;
left := (fNotebk.Width - Width) div 2;
top := 50;
Caption := 'Groupbox 1';
Show;
end;
fGroupBox2 := TGroupBox.Create(Self);
with fGroupBox2 do
begin
Parent := fGroupBox1;
Width := 220;
Height := 210;
left := 10;
top := 10;
Caption := 'Groupbox 2';
Show;
end;
fRadButton := TRadioButton.Create(Self);
with fRadButton do
begin
Parent := fGroupBox2;
Width := 150;
Height := 23;
left := 10;
top := 10;
Caption := 'Radiobutton 1';
Show;
end;
fCheckBox := TCheckBox.Create(Self);
with fCheckBox do
begin
Parent := fGroupBox2;
Width := 150;
Height := 23;
left := 10;
top := 40;
Caption := 'Checkbox 1';
Show;
end;
fComboBox := TComboBox.Create(Self);
with fComboBox do
begin
Parent := fGroupBox2;
Width := 150;
Height := 23;
left := 10;
top := 70;
Caption := 'Combobox 1';
Show;
end;
fLabel := TLabel.Create(Self);
with fLabel do
begin
Parent := fGroupbox2;
OnClick := @Button2Click;
Width := 150;
Height := 23;
left := 10;
top := 100;
Caption := 'Label 1';
Show;
end;
// Create Close Button on the form
fButton3 := TButton.Create(Self);
with fButton3 do
@ -263,6 +341,9 @@ end.
{
$Log$
Revision 1.7 2004/11/05 10:47:57 micha
extend with more controls to test painting interactions
Revision 1.6 2003/07/25 08:52:43 mattias
fixed nested notebook example