Actually destroy the toolbar tool controls when

destryoing the toolbar as we otherwise leave
    ghosts around.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2002-11-19 21:56:10 +00:00
parent 24affeb7e1
commit 52b79074ce
2 changed files with 14 additions and 0 deletions

View File

@@ -159,6 +159,13 @@ bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons
wxToolBar::~wxToolBar()
{
size_t index = 0 ;
for ( index = 0 ; index < m_macToolHandles.Count() ; ++index )
{
// Delete the control as we get ghosts otherwise
::DisposeControl( (ControlHandle) m_macToolHandles[index] );
}
// we must refresh the frame size when the toolbar is deleted but the frame
// is not - otherwise toolbar leaves a hole in the place it used to occupy
}