- m_calendar->SetAutoLayout(TRUE);
- //------------------
- wxLayoutConstraints *c = new wxLayoutConstraints;
- //------------------
- c = new wxLayoutConstraints;
- c->left.PercentOf(this, wxWidth, 10);
- c->right.PercentOf(this, wxWidth, 60);
- c->top.PercentOf(this, wxHeight, 10);
- c->bottom.PercentOf(this, wxHeight, 60);
- m_calendar->SetConstraints(c);
- //------------------
- c = new wxLayoutConstraints;
- c->left.SameAs(m_calendar, wxLeft, 10);
- c->top.SameAs(m_calendar, wxBottom);
- c->height.AsIs();
- c->width.AsIs();
- m_date->SetConstraints(c);
- //------------------
- Layout();
+ wxBoxSizer *m_sizer = new wxBoxSizer( wxHORIZONTAL );
+
+ m_sizer->Add(m_date, 0, wxALIGN_CENTER | wxALL, 10 );
+ m_sizer->Add(m_calendar, 0, wxALIGN_CENTER | wxALIGN_LEFT);
+
+ SetSizer( m_sizer );
+ m_sizer->SetSizeHints( this );