All book controls shares wxBK_* flags [bug #1469980].

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38700 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2006-04-13 18:24:38 +00:00
parent 9916dbf643
commit e0d5d9af8b
2 changed files with 4 additions and 4 deletions

View File

@@ -132,7 +132,7 @@ public:
void SetControlMargin(int margin) { m_controlMargin = margin; }
int GetControlMargin() const { return m_controlMargin; }
// returns true if we have wxCHB_TOP or wxCHB_BOTTOM style
// returns true if we have wxBK_TOP or wxBK_BOTTOM style
bool IsVertical() const { return HasFlag(wxBK_BOTTOM | wxBK_TOP); }
// set/get option to shrink to fit current page

View File

@@ -98,10 +98,10 @@ wxChoicebook::Create(wxWindow *parent,
);
wxSizer* mainSizer = new wxBoxSizer(IsVertical() ? wxVERTICAL : wxHORIZONTAL);
if (style & wxCHB_RIGHT || style & wxCHB_BOTTOM)
if (style & wxBK_RIGHT || style & wxBK_BOTTOM)
mainSizer->Add(0, 0, 1, wxEXPAND, 0);
m_controlSizer = new wxBoxSizer(IsVertical() ? wxHORIZONTAL : wxVERTICAL);
m_controlSizer->Add(m_bookctrl, 1, (IsVertical() ? wxALIGN_CENTRE_VERTICAL : wxALIGN_CENTRE) |wxGROW, 0);
mainSizer->Add(m_controlSizer, 0, wxGROW|wxALL, m_controlMargin);