diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index c8f410dc26..af016c9a15 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -206,6 +206,10 @@ bool wxRadioBox::Create(wxWindow *parent, SetWindowPos(GetHwnd(), HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE); #endif + // Have to invalidate the best size as it may have been calculated + // before the number of buttons was known + InvalidateBestSize(); + SetMajorDim(majorDim == 0 ? n : majorDim, style); SetSelection(0); SetSize(pos.x, pos.y, size.x, size.y);