SetDefault should call parent->SetDefaultItem

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2004-04-17 02:07:31 +00:00
parent 245c5d2e02
commit 97149f1898
2 changed files with 10 additions and 0 deletions

View File

@ -154,6 +154,11 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
void wxButton::SetDefault()
{
wxWindow *parent = GetParent();
wxCHECK_RET( parent, _T("button without parent?") );
wxWindow *winOldDefault = parent->SetDefaultItem(this);
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
gtk_widget_grab_default( m_widget );

View File

@ -154,6 +154,11 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
void wxButton::SetDefault()
{
wxWindow *parent = GetParent();
wxCHECK_RET( parent, _T("button without parent?") );
wxWindow *winOldDefault = parent->SetDefaultItem(this);
GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
gtk_widget_grab_default( m_widget );