]> git.saurik.com Git - wxWidgets.git/commitdiff
Set the toolbar orientation based on the wxBK_ alignment style flag
authorRobin Dunn <robin@alldunn.com>
Wed, 1 Feb 2006 23:45:14 +0000 (23:45 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 1 Feb 2006 23:45:14 +0000 (23:45 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/toolbkg.cpp

index af7d3f2c9ea64187d376ffaf5eaced95d6b75357..9de9582f5e852e8f8666635a8731a7c252b58b5d 100644 (file)
@@ -91,14 +91,19 @@ wxToolbook::Create(wxWindow *parent,
                             wxDefaultValidator, name) )
         return false;
 
-    // TODO: make configurable
+    
+    int orient = wxTB_HORIZONTAL;
+    if ( (style & (wxBK_LEFT | wxBK_RIGHT)) != 0)
+        orient = wxTB_VERTICAL;
+    
+    // TODO: make more configurable
     m_bookctrl = new wxToolBar
                  (
                     this,
                     wxID_TOOLBOOKTOOLBAR,
                     wxDefaultPosition,
                     wxDefaultSize,
-                    wxTB_HORIZONTAL|wxTB_TEXT|wxTB_FLAT|wxTB_NODIVIDER
+                    orient | wxTB_TEXT|wxTB_FLAT|wxTB_NODIVIDER
                  );
 
     return true;