+// Find string for position
+wxString wxRadioBox::GetString(
+ int nNum
+) const
+{
+ return wxGetWindowText(m_ahRadioButtons[nNum]);
+} // end of wxRadioBox::GetString
+
+// For single selection items only
+wxString wxRadioBox::GetStringSelection() const
+{
+ wxString sResult;
+ int nSel = GetSelection();
+
+ if (nSel > -1)
+ sResult = GetString(nSel);
+ return sResult;
+} // end of wxRadioBox::GetStringSelection
+
+wxSize wxRadioBox::GetTotalButtonSize(
+ const wxSize& rSizeBtn
+) const
+{
+ int nCx1;
+ int nCy1;
+ int nExtraHeight;
+ int nHeight;
+ int nWidth;
+ int nWidthLabel;
+
+ wxGetCharSize( m_hWnd
+ ,&nCx1
+ ,&nCy1
+ ,(wxFont*)&GetFont()
+ );
+ nExtraHeight = nCy1;
+
+ nHeight = GetNumVer() * rSizeBtn.y + (2 * nCy1);
+ nWidth = GetNumHor() * (rSizeBtn.x + nCx1) + nCx1;
+
+ //
+ // And also wide enough for its label
+ //
+ GetTextExtent( GetTitle()
+ ,&nWidthLabel
+ ,NULL
+ );
+ nWidthLabel += RADIO_SIZE;
+ if (nWidthLabel > nWidth)
+ nWidth = nWidthLabel;
+
+ return(wxSize( nWidth
+ ,nHeight
+ )
+ );
+} // end of wxRadioBox::GetTotalButtonSize
+
+WXHBRUSH wxRadioBox::OnCtlColor(
+ WXHDC hwinDC
+, WXHWND hWnd
+, WXUINT uCtlColor
+, WXUINT uMessage
+, WXWPARAM wParam
+, WXLPARAM lParam
+)
+{
+ HPS hPS = (HPS)hwinDC; // pass in a PS handle in OS/2
+
+ if (GetParent()->GetTransparentBackground())
+ ::GpiSetBackMix(hPS, BM_LEAVEALONE);
+ else
+ ::GpiSetBackMix(hPS, BM_OVERPAINT);
+
+ wxColour vColBack = GetBackgroundColour();
+
+ ::GpiSetBackColor(hPS, vColBack.GetPixel());
+ ::GpiSetColor(hPS, vColBack.GetPixel());
+
+
+ wxBrush* pBrush = wxTheBrushList->FindOrCreateBrush( vColBack
+ ,wxSOLID
+ );
+ return ((WXHBRUSH)pBrush->GetResourceHandle());
+} // end of wxRadioBox::OnCtlColor
+
+bool wxRadioBox::OS2Command(
+ WXUINT uCmd
+, WXWORD wId
+)
+{
+ int nSelectedButton = -1;
+
+ if (uCmd == BN_CLICKED)