- new wxButton( this, -1, label, wxDefaultPosition, wxSize(100,50)), \
- 1, wxSHAPED | align)
-
- wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
- // top row -- top-aligned
- wxBoxSizer *hsizer1 = new wxBoxSizer( wxHORIZONTAL );
- hsizer1->AddButton( "one", wxALIGN_LEFT | wxALIGN_TOP);
- hsizer1->AddLine(wxVERTICAL);
- hsizer1->AddButton( "two", wxALIGN_CENTER_HORIZONTAL | wxALIGN_TOP);
- hsizer1->AddLine(wxVERTICAL);
- hsizer1->AddButton( "three", wxALIGN_RIGHT | wxALIGN_TOP);
-
- topsizer->Add(hsizer1, 1, wxEXPAND);
- topsizer->AddLine(wxHORIZONTAL);
-
- wxBoxSizer *hsizer2 = new wxBoxSizer( wxHORIZONTAL );
- hsizer2->AddButton( "four", wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
- hsizer2->AddLine(wxVERTICAL);
- // sizer that preserves it's shape
- wxBoxSizer *vsizer = new wxBoxSizer( wxVERTICAL );
- vsizer->Add(
- new wxButton( this, -1, "up", wxDefaultPosition, wxSize(100,25)), \
- 1, wxEXPAND);
- vsizer->Add(
- new wxButton( this, -1, "down", wxDefaultPosition, wxSize(100,25)), \
- 1, wxEXPAND);
- hsizer2->Add(vsizer, 1, wxSHAPED | wxALIGN_CENTER);
- hsizer2->AddLine(wxVERTICAL);
- hsizer2->AddButton( "six", wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
-
- topsizer->Add(hsizer2, 1, wxEXPAND);
- topsizer->AddLine(wxHORIZONTAL);
-
- wxBoxSizer *hsizer3 = new wxBoxSizer( wxHORIZONTAL );
- hsizer3->AddButton( "seven", wxALIGN_LEFT | wxALIGN_BOTTOM);
- hsizer3->AddLine(wxVERTICAL);
- hsizer3->AddButton( "eight", wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM);
- hsizer3->AddLine(wxVERTICAL);
- // wxEXPAND should have no effect
- hsizer3->AddButton( "nine", wxEXPAND | wxALIGN_RIGHT | wxALIGN_BOTTOM);
-
- topsizer->Add(hsizer3, 1, wxEXPAND);
-
- // set frame to minimum size
- topsizer->Fit( this );
-
- // don't allow frame to get smaller than what the sizers tell ye
- // topsizer->SetSizeHints( this );
-
- SetSizer( topsizer );
- SetAutoLayout( TRUE );
+ new wxButton( this, wxID_ANY, label, wxDefaultPosition, wxSize(100,50)), \
+ 1, wxSHAPED | align)
+
+ wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
+ // top row -- top-aligned
+ wxBoxSizer *hsizer1 = new wxBoxSizer( wxHORIZONTAL );
+ hsizer1->AddButton( _T("one"), wxALIGN_LEFT | wxALIGN_TOP);
+ hsizer1->AddLine(wxVERTICAL);
+ hsizer1->AddButton( _T("two"), wxALIGN_CENTER_HORIZONTAL | wxALIGN_TOP);
+ hsizer1->AddLine(wxVERTICAL);
+ hsizer1->AddButton( _T("three"), wxALIGN_RIGHT | wxALIGN_TOP);
+
+ topsizer->Add(hsizer1, 1, wxEXPAND);
+ topsizer->AddLine(wxHORIZONTAL);
+
+ wxBoxSizer *hsizer2 = new wxBoxSizer( wxHORIZONTAL );
+ hsizer2->AddButton( _T("four"), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL);
+ hsizer2->AddLine(wxVERTICAL);
+ // sizer that preserves it's shape
+ wxBoxSizer *vsizer = new wxBoxSizer( wxVERTICAL );
+ vsizer->Add(
+ new wxButton( this, wxID_ANY, _T("up"), wxDefaultPosition, wxSize(100,25) ),
+ 1, wxEXPAND);
+
+ vsizer->Add(
+ new wxButton( this, wxID_ANY, _T("down"), wxDefaultPosition, wxSize(100,25) ),
+ 1, wxEXPAND);
+
+ hsizer2->Add(vsizer, 1, wxSHAPED | wxALIGN_CENTER);
+ hsizer2->AddLine(wxVERTICAL);
+ hsizer2->AddButton( _T("six"), wxALIGN_RIGHT | wxALIGN_CENTER_VERTICAL);
+
+ topsizer->Add(hsizer2, 1, wxEXPAND);
+ topsizer->AddLine(wxHORIZONTAL);
+
+ wxBoxSizer *hsizer3 = new wxBoxSizer( wxHORIZONTAL );
+ hsizer3->AddButton( _T("seven"), wxALIGN_LEFT | wxALIGN_BOTTOM);
+ hsizer3->AddLine(wxVERTICAL);
+ hsizer3->AddButton( _T("eight"), wxALIGN_CENTER_HORIZONTAL | wxALIGN_BOTTOM);
+ hsizer3->AddLine(wxVERTICAL);
+ // wxEXPAND should have no effect
+ hsizer3->AddButton( _T("nine"), wxEXPAND | wxALIGN_RIGHT | wxALIGN_BOTTOM);
+
+ topsizer->Add(hsizer3, 1, wxEXPAND);
+
+ // set frame to minimum size
+ topsizer->Fit( this );
+
+ // don't allow frame to get smaller than what the sizers tell ye
+ // topsizer->SetSizeHints( this );
+
+ SetSizer( topsizer );