- x = m_x + m_width - 3*sizeBtn.x - BUTTON_MARGIN;
- y += SEPARATOR_LINE_MARGIN;
- m_btnPrev = new wxButton(this, -1, _("< &Back"), wxPoint(x, y), sizeBtn);
+ wxBoxSizer *backNextPair = new wxBoxSizer(wxHORIZONTAL);
+ buttonRow->Add(
+ backNextPair,
+ 0, // No horizontal stretching
+ wxALL, // Border all around
+ 5 // Border width
+ );
+
+ m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"));
+ backNextPair->Add(m_btnPrev);
+ backNextPair->Add(BACKNEXT_MARGIN,0,
+ 0, // No horizontal stretching
+ wxEXPAND // No border, (mostly useless) vertical stretching
+ );
+ m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >"));
+ backNextPair->Add(m_btnNext);
+}
+
+void wxWizard::AddButtonRow(wxBoxSizer *mainColumn)
+{
+ wxBoxSizer *buttonRow = new wxBoxSizer(wxHORIZONTAL);
+ mainColumn->Add(
+ buttonRow,
+ 0, // Vertically unstretchable
+ wxALIGN_RIGHT // Right aligned, no border
+ );
+
+ if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
+ buttonRow->Add(
+ new wxButton(this, wxID_HELP, _("&Help")),
+ 0, // Horizontally unstretchable
+ wxALL, // Border all around, top aligned
+ 5 // Border width
+ );
+
+ AddBackNextPair(buttonRow);
+
+ buttonRow->Add(
+ new wxButton(this, wxID_CANCEL, _("&Cancel")),
+ 0, // Horizontally unstretchable
+ wxALL, // Border all around, top aligned
+ 5 // Border width
+ );
+}