git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32146
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
to the Windows implementation.
To use this class, first add buttons to the sizer by calling AddButton (or SetAffirmativeButton, SetNegativeButton,
to the Windows implementation.
To use this class, first add buttons to the sizer by calling AddButton (or SetAffirmativeButton, SetNegativeButton,
-or SetCancelButton) and then call Finalise in order to create the actual button layout used. Other than these special
+or SetCancelButton) and then call Realize in order to create the actual button layout used. Other than these special
operations, this sizer works like any other sizer.
If you add a button with wxID\_SAVE, on Mac OS X the button will be renamed to "Save" and
operations, this sizer works like any other sizer.
If you add a button with wxID\_SAVE, on Mac OS X the button will be renamed to "Save" and
\item wxID\_CONTEXT\_HELP
\end{itemize}
\item wxID\_CONTEXT\_HELP
\end{itemize}
-\membersection{wxStdDialogButtonSizer::Finalise}\label{wxstddialogbuttonsizerfinalise}
+\membersection{wxStdDialogButtonSizer::Realize}\label{wxstddialogbuttonsizerrealize}
-\func{void}{Finalise}{\void}
+\func{void}{Realize}{\void}
Rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines.
Rearranges the buttons and applies proper spacing between buttons to make them match the platform or toolkit's interface guidelines.
// is set to _("Save") and m_buttonNegative is set to _("Don't Save")
// I wouldn't add any other hacks like that into here,
// but this one I can see being useful.
// is set to _("Save") and m_buttonNegative is set to _("Don't Save")
// I wouldn't add any other hacks like that into here,
// but this one I can see being useful.
wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; }
wxButton *GetApplyButton() const { return m_buttonApply; }
wxButton *GetAffirmativeButton() const { return m_buttonAffirmative; }
wxButton *GetApplyButton() const { return m_buttonApply; }
wxStdDialogButtonSizer *sizerBtns = new wxStdDialogButtonSizer;
sizerBtns->AddButton(new wxButton(this, wxID_OK));
sizerBtns->AddButton(new wxButton(this, wxID_CANCEL));
wxStdDialogButtonSizer *sizerBtns = new wxStdDialogButtonSizer;
sizerBtns->AddButton(new wxButton(this, wxID_OK));
sizerBtns->AddButton(new wxButton(this, wxID_CANCEL));
wxSizer *sizerText = new wxBoxSizer(wxHORIZONTAL);
sizerText->Add(new wxStaticText(this, wxID_ANY, _T("Date in ISO format: ")),
wxSizer *sizerText = new wxBoxSizer(wxHORIZONTAL);
sizerText->Add(new wxStaticText(this, wxID_ANY, _T("Date in ISO format: ")),
sizer->AddButton(help);
}
sizer->AddButton(help);
}
if (flags & wxNO_DEFAULT)
{
if (flags & wxNO_DEFAULT)
{
m_buttonCancel = button;
}
m_buttonCancel = button;
}
-void wxStdDialogButtonSizer::Finalise()
+void wxStdDialogButtonSizer::Realize()
{
#ifdef __WXMAC__
Add(0, 0, 0, wxLEFT, 6);
{
#ifdef __WXMAC__
Add(0, 0, 0, wxLEFT, 6);
b.SetDefault()
buttons.AddButton(b)
buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
b.SetDefault()
buttons.AddButton(b)
buttons.AddButton(wx.Button(self, wx.ID_CANCEL, "Cancel"))
border = wx.BoxSizer(wx.VERTICAL)
border.Add(fgs, 1, wx.GROW|wx.ALL, 25)
border = wx.BoxSizer(wx.VERTICAL)
border.Add(fgs, 1, wx.GROW|wx.ALL, 25)
"A special sizer that knows how to order and position standard buttons
in order to conform to the current platform's standards. You simply
need to add each `wx.Button` to the sizer, and be sure to create the
"A special sizer that knows how to order and position standard buttons
in order to conform to the current platform's standards. You simply
need to add each `wx.Button` to the sizer, and be sure to create the
-buttons using the standard ID's. Then call `Finalize` and the sizer
+buttons using the standard ID's. Then call `Realize` and the sizer
will take care of the rest.
", "");
will take care of the rest.
", "");
method in the base class.", "");
DocDeclStr(
method in the base class.", "");
DocDeclStr(
"This funciton needs to be called after all the buttons have been added
to the sizer. It will reorder them and position them in a platform
specifc manner.", "");
"This funciton needs to be called after all the buttons have been added
to the sizer. It will reorder them and position them in a platform
specifc manner.", "");
btnsizer = wx.StdDialogButtonSizer()
btnsizer.AddButton(ok)
btnsizer.AddButton(cancel)
btnsizer = wx.StdDialogButtonSizer()
btnsizer.AddButton(ok)
btnsizer.AddButton(cancel)
dlgsizer.Add(btnsizer, 0, wx.ALL | wx.ALIGN_RIGHT, 4)
dlgsizer.Add(btnsizer, 0, wx.ALL | wx.ALIGN_RIGHT, 4)