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
This commit is contained in:
Robin Dunn 2006-02-01 23:45:14 +00:00
parent b2383543b6
commit 917cd965fa

View 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;