I am testing the wxAuiToolBar class as a replacement for the existing wxToolbar.
My initialization works fine - I can even set nested / vectorized .png files as bitmaps for elements, which is really cool - but I would like the user to be able to specify what size of the toolbar they want (16x16, 22x22 or 32x32 ) I think that means calling wxAuiToolBarItem.SetBitmap () for each toolbar item, and then wxToolBar.Realize () to redraw the changes. Correct me if there is a better way to do this!
As an example, I have a standard File toolbar with new buttons / open / save / print. They are added to the wxAuiManager member as follows:
auiFileToolBar = new wxAuiToolbar(pFrame, ID_AUIFILETOOLBAR, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE);
auiFileToolBar->AddTool(ID_TBI_FILE_NEW, _("New"), wxNullBitmap, wxNullBitmap, wxITEM_NORMAL, wxEmptyString, wxEmptyString, NULL);
auiFileToolBar->Realize();
m_AuiManager->AddPane(auiFileToolBar, wxAuiPaneInfo().Name(_T("File")).ToolbarPane().Caption(_T("File")).Layer(10).Top.Gripper(false));
So now that I have everything configured, how do I get into this ToolBarItem given the wxAuiManager (m_AuiManager) member associated with the frame? Or is there a better way to resize toolbars?
source
share