- // left pane
- wxStaticBox *box = new wxStaticBox(this, wxID_ANY, wxT("Date details"));
-
- wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
-
- sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Day:"), DatePickerPage_Day , &m_day ),
- 0, wxALL | wxALIGN_RIGHT , 5 );
-
- sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Month:"), DatePickerPage_Month , &m_month ),
- 0, wxALL | wxALIGN_RIGHT , 5 );
-
- sizerLeft->Add( CreateSizerWithTextAndLabel( wxT("&Year:"), DatePickerPage_Year , &m_year ),
- 0, wxALL | wxALIGN_RIGHT , 5 );
-
- sizerLeft->Add( new wxButton( this, DatePickerPage_Set, wxT("&Set date") ),
- 0, wxALL , 5 );
-
- // right pane
+ // left pane: style
+ wxSizer* const sizerLeft = new wxBoxSizer(wxVERTICAL);
+
+ static const wxString kinds[] = { "&Default", "&Spin", "Drop do&wn" };
+ m_radioKind = new wxRadioBox(this, wxID_ANY, "&Kind",
+ wxDefaultPosition, wxDefaultSize,
+ WXSIZEOF(kinds), kinds,
+ 1, wxRA_SPECIFY_COLS);
+ sizerLeft->Add(m_radioKind, wxSizerFlags().Expand().Border());
+
+ wxSizer* const sizerStyle = new wxStaticBoxSizer(wxVERTICAL, this, "&Style");
+ m_chkStyleCentury = CreateCheckBoxAndAddToSizer(sizerStyle, "Show ¢ury");
+ m_chkStyleAllowNone = CreateCheckBoxAndAddToSizer(sizerStyle, "Allow &no value");
+
+ sizerLeft->Add(sizerStyle, wxSizerFlags().Expand().Border());
+
+ sizerLeft->Add(new wxButton(this, DatePickerPage_Reset, "&Recreate"),
+ wxSizerFlags().Centre().Border());
+
+
+ // middle pane: operations
+ wxSizer* const sizerMiddle = new wxBoxSizer(wxVERTICAL);
+ sizerMiddle->Add(CreateSizerWithTextAndButton
+ (
+ DatePickerPage_Set,
+ "&Set date",
+ wxID_ANY,
+ &m_textCur
+ ),
+ wxSizerFlags().Expand().Border());
+
+ m_textCur->SetMinSize(wxSize(GetTextExtent(" 9999-99-99 ").x, -1));
+
+ sizerMiddle->AddSpacer(10);
+
+ sizerMiddle->Add(CreateSizerWithTextAndLabel
+ (
+ "&Min date",
+ wxID_ANY,
+ &m_textMin
+ ),
+ wxSizerFlags().Expand().Border());
+ sizerMiddle->Add(CreateSizerWithTextAndLabel
+ (
+ "Ma&x date",
+ wxID_ANY,
+ &m_textMax
+ ),
+ wxSizerFlags().Expand().Border());
+ sizerMiddle->Add(new wxButton(this, DatePickerPage_SetRange, "Set &range"),
+ wxSizerFlags().Centre().Border());
+
+
+ // right pane: control itself