diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index 5f527f323b..354a64acec 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -149,6 +149,11 @@ bool wxRadioBox::Create(wxWindow *parent, if ( !wxStaticBox::Create(parent, id, title, pos, size, style, name) ) return false; + // the code elsewhere in this file supposes that either wxRA_SPECIFY_COLS + // or wxRA_SPECIFY_ROWS is set, ensure that this is indeed the case + if ( !(style & (wxRA_SPECIFY_ROWS | wxRA_SPECIFY_COLS)) ) + style |= wxRA_SPECIFY_COLS; + #if wxUSE_VALIDATORS SetValidator(val); #else