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:
@@ -45,6 +45,7 @@ public:
|
|||||||
|
|
||||||
static wxSize GetDefaultSize();
|
static wxSize GetDefaultSize();
|
||||||
|
|
||||||
|
virtual void SetLabel(const wxString& label);
|
||||||
virtual wxWindow *SetDefault();
|
virtual wxWindow *SetDefault();
|
||||||
virtual void Command(wxCommandEvent& event);
|
virtual void Command(wxCommandEvent& event);
|
||||||
|
|
||||||
|
@@ -43,7 +43,8 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )
|
if ( !wxButtonBase::Create(parent, id, pos, size, style, validator, name) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
m_labelOrig = m_label = label ;
|
m_labelOrig =
|
||||||
|
m_label = label ;
|
||||||
|
|
||||||
m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
|
m_peer = wxWidgetImpl::CreateButton( this, parent, id, label, pos, size, style, GetExtraStyle() );
|
||||||
|
|
||||||
@@ -52,6 +53,20 @@ bool wxButton::Create(wxWindow *parent,
|
|||||||
return true;
|
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 *wxButton::SetDefault()
|
||||||
{
|
{
|
||||||
wxWindow *btnOldDefault = wxButtonBase::SetDefault();
|
wxWindow *btnOldDefault = wxButtonBase::SetDefault();
|
||||||
|
Reference in New Issue
Block a user