mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 16:55:58 +02:00
extend with more controls to test painting interactions
git-svn-id: trunk@6203 -
This commit is contained in:
parent
7f9d5da0ad
commit
ea58339ac8
@ -98,7 +98,7 @@ procedure TForm1.LoadMainMenu;
|
|||||||
begin
|
begin
|
||||||
{ set the height and width }
|
{ set the height and width }
|
||||||
Height := 350;
|
Height := 350;
|
||||||
Width := 700;
|
Width := 350;
|
||||||
|
|
||||||
{ Create a groupbox }
|
{ Create a groupbox }
|
||||||
grpTst := TGroupBox.Create(Self);
|
grpTst := TGroupBox.Create(Self);
|
||||||
@ -117,6 +117,15 @@ begin
|
|||||||
begin
|
begin
|
||||||
Button2 := TButton.Create(grpTst);
|
Button2 := TButton.Create(grpTst);
|
||||||
Button2.Parent := 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
|
end
|
||||||
else begin
|
else begin
|
||||||
Button2 := TButton.Create(Self);
|
Button2 := TButton.Create(Self);
|
||||||
|
@ -25,7 +25,7 @@ unit notebku;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses Classes, SysUtils, Controls, Forms, ExtCtrls, Buttons;
|
uses Classes, SysUtils, Controls, Forms, ExtCtrls, Buttons, StdCtrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
TForm1 = class(TForm)
|
TForm1 = class(TForm)
|
||||||
@ -40,6 +40,11 @@ type
|
|||||||
fButton4: TButton;
|
fButton4: TButton;
|
||||||
fButton5: TButton;
|
fButton5: TButton;
|
||||||
fButton6: TButton;
|
fButton6: TButton;
|
||||||
|
FRadButton: TRadioButton;
|
||||||
|
FCheckBox: TCheckBox;
|
||||||
|
FComboBox: TComboBox;
|
||||||
|
FLabel: TLabel;
|
||||||
|
FGroupbox1, FGroupbox2: TGroupBox;
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
procedure Button1Click(Sender: TObject);
|
procedure Button1Click(Sender: TObject);
|
||||||
procedure Button2Click(Sender: TObject);
|
procedure Button2Click(Sender: TObject);
|
||||||
@ -141,6 +146,79 @@ begin
|
|||||||
Show;
|
Show;
|
||||||
end;
|
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
|
// Create Close Button on the form
|
||||||
fButton3 := TButton.Create(Self);
|
fButton3 := TButton.Create(Self);
|
||||||
with fButton3 do
|
with fButton3 do
|
||||||
@ -263,6 +341,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.6 2003/07/25 08:52:43 mattias
|
||||||
fixed nested notebook example
|
fixed nested notebook example
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user