X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/facd6764872eede45605ba7c9dfa0e1d0c708fa2..59c73be893dece9562e39ef7a2faa83b962c1d4e:/src/mac/carbon/radiobox.cpp diff --git a/src/mac/carbon/radiobox.cpp b/src/mac/carbon/radiobox.cpp index 83bd0a1f78..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_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , "\p" , true , 0 , 0 , 1, - kControlGroupBoxTextTitleProc , (long) this ) ; + m_peer = new wxMacControl() ; + + verify_noerr(CreateGroupBoxControl(MAC_WXHWND(parent->MacGetTopLevelWindowRef()),&bounds, CFSTR("") , + 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);