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:
@@ -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
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user