From: Robin Dunn Date: Wed, 1 Feb 2006 23:45:14 +0000 (+0000) Subject: Set the toolbar orientation based on the wxBK_ alignment style flag X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/917cd965fac6cca874e3fa777013433c598d8c8f Set the toolbar orientation based on the wxBK_ alignment style flag git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/toolbkg.cpp b/src/generic/toolbkg.cpp index af7d3f2c9e..9de9582f5e 100644 --- a/src/generic/toolbkg.cpp +++ b/src/generic/toolbkg.cpp @@ -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;