From ea58339ac883c161bf8ac22138c3a647d85d4fbb Mon Sep 17 00:00:00 2001 From: micha Date: Fri, 5 Nov 2004 10:47:57 +0000 Subject: [PATCH] extend with more controls to test painting interactions git-svn-id: trunk@6203 - --- examples/groupbox.pp | 11 +++++- examples/notebku.pp | 83 +++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/examples/groupbox.pp b/examples/groupbox.pp index a22558b18b..9533a4a226 100644 --- a/examples/groupbox.pp +++ b/examples/groupbox.pp @@ -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); diff --git a/examples/notebku.pp b/examples/notebku.pp index b3f6f5b9b1..9529a8a4ab 100644 --- a/examples/notebku.pp +++ b/examples/notebku.pp @@ -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