void wxButton::SetDefault()
{
wxWindow *parent = GetParent();
- wxPanel *panel = wxDynamicCast(parent, wxPanel);
- if ( panel )
- panel->SetDefaultItem(this);
+ if ( parent )
+ parent->SetDefaultItem(this);
// We initially do not set XmNdefaultShadowThickness, to have small buttons.
// Unfortunately, buttons are now mis-aligned. We try to correct this