Help button left-aligned in wizard
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
49e3e2c25f
commit
977a381865
@ -391,6 +391,15 @@ void wxWizard::AddButtonRow(wxBoxSizer *mainColumn)
|
|||||||
// was created before the 'next' button.
|
// was created before the 'next' button.
|
||||||
|
|
||||||
wxBoxSizer *buttonRow = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *buttonRow = new wxBoxSizer(wxHORIZONTAL);
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
|
||||||
|
mainColumn->Add(
|
||||||
|
buttonRow,
|
||||||
|
0, // Vertically unstretchable
|
||||||
|
wxGROW|wxALIGN_CENTRE
|
||||||
|
);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
mainColumn->Add(
|
mainColumn->Add(
|
||||||
buttonRow,
|
buttonRow,
|
||||||
0, // Vertically unstretchable
|
0, // Vertically unstretchable
|
||||||
@ -399,20 +408,33 @@ void wxWizard::AddButtonRow(wxBoxSizer *mainColumn)
|
|||||||
|
|
||||||
// Desired TAB order is 'next', 'cancel', 'help', 'back'. This makes the 'back' button the last control on the page.
|
// Desired TAB order is 'next', 'cancel', 'help', 'back'. This makes the 'back' button the last control on the page.
|
||||||
// Create the buttons in the right order...
|
// Create the buttons in the right order...
|
||||||
m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >"));
|
|
||||||
wxButton *btnCancel=new wxButton(this, wxID_CANCEL, _("&Cancel"));
|
|
||||||
wxButton *btnHelp=0;
|
wxButton *btnHelp=0;
|
||||||
|
#ifdef __WXMAC__
|
||||||
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
|
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
|
||||||
btnHelp=new wxButton(this, wxID_HELP, _("&Help"));
|
btnHelp=new wxButton(this, wxID_HELP, _("&Help"));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
m_btnNext = new wxButton(this, wxID_FORWARD, _("&Next >"));
|
||||||
|
wxButton *btnCancel=new wxButton(this, wxID_CANCEL, _("&Cancel"));
|
||||||
|
#ifndef __WXMAC__
|
||||||
|
if (GetExtraStyle() & wxWIZARD_EX_HELPBUTTON)
|
||||||
|
btnHelp=new wxButton(this, wxID_HELP, _("&Help"));
|
||||||
|
#endif
|
||||||
m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"));
|
m_btnPrev = new wxButton(this, wxID_BACKWARD, _("< &Back"));
|
||||||
|
|
||||||
if (btnHelp)
|
if (btnHelp)
|
||||||
|
{
|
||||||
buttonRow->Add(
|
buttonRow->Add(
|
||||||
btnHelp,
|
btnHelp,
|
||||||
0, // Horizontally unstretchable
|
0, // Horizontally unstretchable
|
||||||
wxALL, // Border all around, top aligned
|
wxALL, // Border all around, top aligned
|
||||||
5 // Border width
|
5 // Border width
|
||||||
);
|
);
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
// Put stretchable space between help button and others
|
||||||
|
buttonRow->Add(0, 0, 1, wxALIGN_CENTRE, 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
AddBackNextPair(buttonRow);
|
AddBackNextPair(buttonRow);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user