diff --git a/src/common/tbarbase.cpp b/src/common/tbarbase.cpp index a5b9192dac..5272c298f3 100644 --- a/src/common/tbarbase.cpp +++ b/src/common/tbarbase.cpp @@ -674,7 +674,7 @@ void wxToolBarBase::OnMouseEnter(int toolid) event.SetEventObject(this); event.SetInt(toolid); - wxFrame *frame = wxDynamicCast(GetParent(), wxFrame); + wxFrame *frame = wxDynamicCast(wxGetTopLevelParent(this), wxFrame); if ( frame ) { wxString help;