-
- for (int i = 0 ; i < m_noItems; i++)
- {
- GetTextExtent(GetString(i), &eachWidth, &eachHeight);
- eachWidth = (int)(eachWidth + RADIO_SIZE) ;
- eachHeight = (int)((3 * eachHeight) / 2);
- if (maxWidth < eachWidth) maxWidth = eachWidth;
- if (maxHeight < eachHeight) maxHeight = eachHeight;
- }
-
- totHeight = GetRowCount() * (maxHeight + charHeight/2) + charHeight ;
- totWidth = GetColumnCount() * (maxWidth + charWidth) + charWidth;
-
- // handle radio box title as well
- GetTextExtent(GetTitle(), &eachWidth, NULL);
- eachWidth = (int)(eachWidth + RADIO_SIZE) + 3 * charWidth ;
- if (totWidth < eachWidth)
- totWidth = eachWidth;
-
- return wxSize(totWidth, totHeight);
-}
-//-------------------------------------------------------------------------------------
-// ¥ GetNumVer
-//-------------------------------------------------------------------------------------
-// return the number of buttons in the vertical direction
-
-int wxRadioBox::GetRowCount() const
-{
- if ( m_windowStyle & wxRA_SPECIFY_ROWS )
- {
- return m_majorDim;
- }
- else
- {
- return (m_noItems + m_majorDim - 1)/m_majorDim;
- }
-}
-
-//-------------------------------------------------------------------------------------
-// ¥ GetNumHor
-//-------------------------------------------------------------------------------------
-// return the number of buttons in the horizontal direction