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:
@@ -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();
|
||||
|
Reference in New Issue
Block a user