Skip to content

Instantly share code, notes, and snippets.

@PBfordev
Created May 16, 2020 09:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PBfordev/8fba974627324bea0beeb46b8095af92 to your computer and use it in GitHub Desktop.
Save PBfordev/8fba974627324bea0beeb46b8095af92 to your computer and use it in GitHub Desktop.
#include <wx/wx.h>
#include <wx/artprov.h>
class MyApp : public wxApp
{
public:
bool OnInit() override
{
wxFrame* f = new wxFrame(nullptr, wxID_ANY, "Toolbar test");
wxPanel* p = new wxPanel(f);
p->SetBackgroundColour(*wxRED);
for ( size_t i = 0; i < 2; ++i )
{
wxToolBar* toolBar = new wxToolBar(f, wxID_ANY);
toolBar->AddTool(wxID_ABOUT, "", wxArtProvider::GetBitmap(wxART_INFORMATION, wxART_TOOLBAR));
toolBar->Realize();
f->SetToolBar(toolBar);
}
f->Show();
return true;
}
}; wxIMPLEMENT_APP(MyApp);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment