respect wxBU_NOTEXT style in wxButton

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61132 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-06-19 23:24:51 +00:00
parent cd0d451b08
commit 85284ca4b2
2 changed files with 17 additions and 1 deletions

View File

@@ -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();