]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/toolbar/toolbar.cpp
Some work on GTK focus handling and events.
[wxWidgets.git] / samples / toolbar / toolbar.cpp
index 96be6becfb9dbcc518d9418b988e68d84a31cd63..8ec29ca590e3830844b5a1ec8d672ce26e531133 100644 (file)
@@ -18,7 +18,7 @@
 // ----------------------------------------------------------------------------
 
 // For compilers that support precompilation, includes "wx/wx.h".
-#include <wx/wxprec.h>
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
     #pragma hdrstop
@@ -152,6 +152,8 @@ private:
 
 const int ID_TOOLBAR = 500;
 
+static const long TOOLBAR_STYLE = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE;
+
 enum
 {
     IDM_TOOLBAR_TOGGLETOOLBARSIZE = 200,
@@ -240,7 +242,7 @@ void MyFrame::RecreateToolbar()
 
     SetToolBar(NULL);
 
-    long style = wxNO_BORDER | wxTB_FLAT | wxTB_DOCKABLE;
+    long style = TOOLBAR_STYLE;
     style |= m_horzToolbar ? wxTB_HORIZONTAL : wxTB_VERTICAL;
 
     toolBar = CreateToolBar(style, ID_TOOLBAR);
@@ -465,7 +467,7 @@ void MyFrame::OnToggleAnotherToolbar(wxCommandEvent& WXUNUSED(event))
     {
         m_tbar = new wxToolBar(this, -1,
                                wxDefaultPosition, wxDefaultSize,
-                               wxTB_VERTICAL);
+                               TOOLBAR_STYLE | wxTB_VERTICAL);
         m_tbar->AddTool(wxID_HELP, wxBITMAP(help),
                         wxNullBitmap, FALSE,
                         NULL,