]> git.saurik.com Git - wxWidgets.git/commitdiff
Added some test code
authorRobin Dunn <robin@alldunn.com>
Thu, 21 Oct 1999 21:13:21 +0000 (21:13 +0000)
committerRobin Dunn <robin@alldunn.com>
Thu, 21 Oct 1999 21:13:21 +0000 (21:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/controls/controls.cpp

index 91ee748916f0ff2d64c71656b92e82b8d0aa2ff6..76d3d3e3433b96230d3a77a60c8fe31e3c31e2c1 100644 (file)
@@ -530,6 +530,35 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
     new wxButton(panel, -1, "Another button", wxPoint(250, 20));
 
     m_notebook->AddPage(panel, "wxBitmapXXX");
+
+// --------------- TEST CODE ----------------------
+
+  panel = new wxPanel(m_notebook);
+  panel->SetAutoLayout( true );
+
+  wxLayoutConstraints *c;
+  c = new wxLayoutConstraints;
+  c->top.SameAs( panel, wxTop, 10 );
+  c->height.AsIs( );
+  c->left.SameAs( panel, wxLeft, 10 );
+  c->width.PercentOf( panel, wxWidth, 40 );
+
+  wxButton *pMyButton = new wxButton(panel, -1, "Test Button" );
+  pMyButton->SetConstraints( c );
+
+  c = new wxLayoutConstraints;
+  c->top.SameAs( panel, wxTop, 10 );
+  c->bottom.SameAs( panel, wxBottom, 10 );
+  c->right.SameAs( panel, wxRight, 10 );
+  c->width.PercentOf( panel, wxWidth, 40 );
+
+  wxButton *pMyButton2 = new wxButton(panel, -1, "Test Button 2" );
+  pMyButton2->SetConstraints( c );
+
+  m_notebook->AddPage(panel, "test layout");
+
+// --------------- TEST CODE ----------------------
+
 }
 
 void MyPanel::OnSize( wxSizeEvent& WXUNUSED(event) )