- wxSizer *sizerBtm = new wxBoxSizer(wxHORIZONTAL);
- sizerBtm->Add(new MyScrolledWindowDumb(this), flagsExpand);
- sizerBtm->Add(new MyScrolledWindowSmart(this), flagsExpand);
- topsizer->Add(sizerBtm, flagsExpand);
+ m_win1 = new MyScrolledWindowDumb(panel);
+ m_win2 = new MyScrolledWindowSmart(panel);
+
+ wxSizer *sizerScrollWin = new wxBoxSizer(wxHORIZONTAL);
+ sizerScrollWin->Add(m_win1, flagsExpand);
+ sizerScrollWin->Add(m_win2, flagsExpand);
+ topsizer->Add(sizerScrollWin, flagsExpand);
+
+ const wxSizerFlags
+ flagsHBorder(wxSizerFlags().Centre().Border(wxLEFT | wxRIGHT));
+
+ wxSizer *sizerBtns = new wxBoxSizer(wxHORIZONTAL);
+
+ // the radio buttons are in the same order as wxSHOW_SB_XXX values but
+ // offset by 1
+ const wxString visibilities[] = { "&never", "&default", "&always" };
+ wxRadioBox *radio = new wxRadioBox(panel, Scroll_Radio_ShowScrollbar,
+ "Left &scrollbar visibility: ",
+ wxDefaultPosition, wxDefaultSize,
+ WXSIZEOF(visibilities), visibilities);
+ radio->SetSelection(wxSHOW_SB_DEFAULT + 1);
+ sizerBtns->Add(radio, flagsHBorder);
+
+ sizerBtns->Add(new wxToggleButton(panel, Scroll_TglBtn_Sync, "S&ynchronize"),
+ flagsHBorder);
+
+ topsizer->Add(sizerBtns, wxSizerFlags().Centre().Border());