在 wxWidgets3.0.0 上,我想改变 wxAuiToolBar 背景,所以我创建 wxAuiToolBar 使用 wxAUI_TB_PLAIN_BACKGROUND 样式。然而,并没有达到预期的效果。例子:
// create some toolbars
wxAuiToolBar* tb1 = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_PLAIN_BACKGROUND);
tb1->SetToolBitmapSize(wxSize(48,48));
tb1->AddTool(ID_SampleItem+1, wxT("Test"), wxArtProvider::GetBitmap(wxART_ERROR));
tb1->AddSeparator();
tb1->AddTool(ID_SampleItem+2, wxT("Test"), wxArtProvider::GetBitmap(wxART_QUESTION));
tb1->AddTool(ID_SampleItem+3, wxT("Test"), wxArtProvider::GetBitmap(wxART_INFORMATION));
tb1->AddTool(ID_SampleItem+4, wxT("Test"), wxArtProvider::GetBitmap(wxART_WARNING));
tb1->AddTool(ID_SampleItem+5, wxT("Test"), wxArtProvider::GetBitmap(wxART_MISSING_IMAGE));
tb1->SetCustomOverflowItems(prepend_items, append_items);
tb1->Realize();