diff --git a/src/generic/tbarsmpl.cpp b/src/generic/tbarsmpl.cpp index 522736e77f..b7e16e0d4d 100644 --- a/src/generic/tbarsmpl.cpp +++ b/src/generic/tbarsmpl.cpp @@ -356,13 +356,15 @@ bool wxToolBarSimple::Realize() } if ( GetWindowStyleFlag() & wxTB_HORIZONTAL ) - m_maxWidth += maxToolWidth; - else m_maxHeight += maxToolHeight; + else + m_maxWidth += maxToolWidth; m_maxWidth += m_xMargin; m_maxHeight += m_yMargin; + SetSize(m_maxWidth, m_maxHeight); + return TRUE; }