wxToolBarBase *toolBar = GetToolBar();
long style = toolBar ? toolBar->GetWindowStyle() : TOOLBAR_STYLE;
+ if (toolBar && m_searchTool && m_searchTool->GetToolBar() == NULL)
+ {
+ // see ~MyFrame()
+ toolBar->AddTool(m_searchTool);
+ }
+ m_searchTool = NULL;
+
delete toolBar;
SetToolBar(NULL);
}
}
+ // this call is actually unnecessary as the toolbar will adjust its tools
+ // size to fit the biggest icon used anyhow but it doesn't hurt neither
toolBar->SetToolBitmapSize(wxSize(w, h));
toolBar->AddTool(wxID_NEW, _T("New"),
void MyFrame::OnToolbarCustomBitmap(wxCommandEvent& WXUNUSED(event))
{
- m_pathBmp = wxFileSelector(_T("Custom bitmap path"));
+ m_pathBmp = wxLoadFileSelector("custom bitmap", "");
RecreateToolbar();
}