X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/655719367ac5e131d9642e5783f3ecf64d1a3385..c4a95f6f991fa8685625831e52dc021b89727529:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index cf279d567b..3695edf6ca 100644 --- a/src/mac/carbon/radiobox.cpp +++ b/src/mac/carbon/radiobox.cpp @@ -137,8 +137,10 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, if ( bounds.bottom <= bounds.top ) bounds.bottom = bounds.top + 100 ; + m_peer = new wxMacControl() ; + verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") , - true /*primary*/ , (ControlRef*)&m_macControl ) ) ; + true /*primary*/ , m_peer->GetControlRefAddr() ) ) ; for (i = 0; i < n; i++) { @@ -481,7 +483,7 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags) { if (i&&((i%m_majorDim)==0)) // not to do for the zero button! { - if (m_windowStyle & wxRA_VERTICAL) + if (m_windowStyle & wxRA_SPECIFY_ROWS) { x_offset += maxWidth + charWidth; y_offset = y_start; @@ -510,7 +512,7 @@ wxSize wxRadioBox::DoGetBestSize() const int eachWidth, eachHeight; int totWidth, totHeight; - wxFont font = GetParent()->GetFont(); + wxFont font = /*GetParent()->*/GetFont(); GetTextExtent(wxT("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), &charWidth, &charHeight, NULL, NULL, &font);