changed the button container from wxPanel to wxWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2001-12-04 16:48:26 +00:00
parent e8566d3538
commit eddd3a9d37
2 changed files with 6 additions and 8 deletions

View File

@@ -50,12 +50,11 @@ void wxButton::SetDefault()
{
wxWindow *parent = GetParent();
wxButton *btnOldDefault = NULL;
wxPanel *panel = wxDynamicCast(parent, wxPanel);
if ( panel )
if ( parent )
{
btnOldDefault = wxDynamicCast(panel->GetDefaultItem(),
btnOldDefault = wxDynamicCast(parent->GetDefaultItem(),
wxButton);
panel->SetDefaultItem(this);
parent->SetDefaultItem(this);
}
Boolean inData;

View File

@@ -50,12 +50,11 @@ void wxButton::SetDefault()
{
wxWindow *parent = GetParent();
wxButton *btnOldDefault = NULL;
wxPanel *panel = wxDynamicCast(parent, wxPanel);
if ( panel )
if ( parent )
{
btnOldDefault = wxDynamicCast(panel->GetDefaultItem(),
btnOldDefault = wxDynamicCast(parent->GetDefaultItem(),
wxButton);
panel->SetDefaultItem(this);
parent->SetDefaultItem(this);
}
Boolean inData;