+ wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
+ SetSizer(sizer);
+
+ // On Mac, don't create a 'native' wxToolBar because small bitmaps are not supported by native
+ // toolbars. On Mac, a non-native, small-bitmap toolbar doesn't show unless it is explicitly
+ // managed, hence the use of sizers. In a real application, use larger icons for the main
+ // toolbar to avoid the need for this workaround. Or, use the toolbar in a container window
+ // as part of a more complex hierarchy, and the toolbar will automatically be non-native.
+
+ wxSystemOptions::SetOption(wxT("mac.toolbar.no-native"), 1);
+
+ wxToolBar* toolBar = new wxToolBar(this, wxID_ANY, wxDefaultPosition, wxDefaultSize,
+ wxNO_BORDER|wxTB_FLAT|wxTB_NODIVIDER|wxTB_NOALIGN);
+
+ sizer->Add(toolBar, 0, wxEXPAND);