X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cd0d451b082ad2e3adc3691116eff24528d7a646..85284ca4b226d9a1ab6bed26c5eaa480543649d5:/src/osx/button_osx.cpp diff --git a/src/osx/button_osx.cpp b/src/osx/button_osx.cpp index 6428e4842a..a7c7cf869c 100644 --- a/src/osx/button_osx.cpp +++ b/src/osx/button_osx.cpp @@ -43,7 +43,8 @@ bool wxButton::Create(wxWindow *parent, if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) ) return false; - m_labelOrig = m_label = label ; + m_labelOrig = + m_label = label ; m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() ); @@ -52,6 +53,20 @@ bool wxButton::Create(wxWindow *parent, return true; } +void wxButton::SetLabel(const wxString& label) +{ + if ( GetId() == wxID_HELP || HasFlag(wxBU_NOTEXT) ) + { + // just store the label internally but don't really use it for the + // button + m_labelOrig = + m_label = label; + return; + } + + wxButtonBase::SetLabel(label); +} + wxWindow *wxButton::SetDefault() { wxWindow *btnOldDefault = wxButtonBase::SetDefault();