ensure that one of wxRA_SPECIFY_{COLS,ROWS} is set in the radiobox style, otherwise layout code doesn't work correctly and this can easily happen if the radiobox is created from an XRC file not specifying its style at all

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@54927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-08-02 15:59:13 +00:00
parent bc217fe9dc
commit 7e8f47db5e

View File

@@ -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