- wxControl *control;
- control = new wxControl( m_panel, -1, wxPoint(30,20), wxSize(50,50), wxBORDER_SUNKEN );
- control = new wxControl( m_panel, -1, wxPoint(130,20), wxSize(50,50), wxBORDER_SIMPLE );
- control = new wxControl( m_panel, -1, wxPoint(230,20), wxSize(50,50), wxBORDER_RAISED );
- control = new wxControl( m_panel, -1, wxPoint(330,20), wxSize(50,50), wxBORDER_THEME );
-
- wxScrolledWindow *scrolled;
- scrolled = new wxScrolledWindow( m_panel, -1, wxPoint(30,120), wxSize(80,80), wxHSCROLL|wxVSCROLL | wxBORDER_SUNKEN );
- scrolled->SetVirtualSize(400,400);
- scrolled->SetScrollRate(10,10);
- scrolled = new wxScrolledWindow( m_panel, -1, wxPoint(130,120), wxSize(80,80), wxHSCROLL|wxVSCROLL | wxBORDER_SIMPLE );
- scrolled->SetVirtualSize(400,400);
- scrolled->SetScrollRate(10,10);
- scrolled = new wxScrolledWindow( m_panel, -1, wxPoint(230,120), wxSize(80,80), wxHSCROLL|wxVSCROLL | wxBORDER_RAISED );
- scrolled->SetVirtualSize(400,400);
- scrolled->SetScrollRate(10,10);
+MyFrame::~MyFrame()
+{
+ if ( m_searchTool && !m_searchTool->GetToolBar() )
+ {
+ // we currently can't delete a toolbar tool ourselves, so we have to
+ // attach it to the toolbar just for it to be deleted, this is pretty
+ // ugly and will need to be changed
+ GetToolBar()->AddTool(m_searchTool);
+ }