diff --git a/interface/wx/aui/auibar.h b/interface/wx/aui/auibar.h index 12d9255be5..3bfa1763a4 100644 --- a/interface/wx/aui/auibar.h +++ b/interface/wx/aui/auibar.h @@ -47,7 +47,10 @@ enum wxAuiToolBarStyle wxAUI_TB_VERTICAL = 1 << 5, /** - Shows the text and the icons alongside, not vertically stacked. This style must be used with wxAUI_TB_TEXT + Shows the text and the icons alongside, not vertically stacked. + + This style must be used with wxAUI_TB_TEXT and can't be used with + wxAUI_TB_VERTICAL. */ wxAUI_TB_HORZ_LAYOUT = 1 << 6, @@ -755,6 +758,9 @@ public: whereas by default it can be horizontal or vertical and be docked anywhere. @style{wxAUI_TB_HORZ_LAYOUT} + For horizontal toolbars, show the text and the icons alongside, + not vertically stacked. This style must be used with wxAUI_TB_TEXT + and can't be used with wxAUI_TB_VERTICAL. @style{wxAUI_TB_HORIZONTAL} Analogous to wxAUI_TB_VERTICAL, but forces the toolbar to be horizontal. diff --git a/src/aui/auibar.cpp b/src/aui/auibar.cpp index c3dab7ddd8..b0b00364d7 100644 --- a/src/aui/auibar.cpp +++ b/src/aui/auibar.cpp @@ -909,6 +909,16 @@ bool wxAuiToolBar::Create(wxWindow* parent, SetFont(*wxNORMAL_FONT); SetArtFlags(); SetExtraStyle(wxWS_EX_PROCESS_IDLE); + + if ( style & wxAUI_TB_VERTICAL ) + { + wxASSERT_MSG + ( + !(style & wxAUI_TB_HORZ_LAYOUT), + "Horizontal layout style can't be used with vertical toolbars" + ); + } + if (style & wxAUI_TB_HORZ_LAYOUT) SetToolTextOrientation(wxAUI_TBTOOL_TEXT_RIGHT); SetBackgroundStyle(wxBG_STYLE_PAINT);