-
- for (int i = 0 ; i < m_noItems; i++)
- {
- GetTextExtent(GetString(i), &eachWidth, &eachHeight,NULL, NULL, &font);
- eachWidth = (int)(eachWidth + RADIO_SIZE) ;
- eachHeight = (int)((3 * eachHeight) / 2);
- if (maxWidth < eachWidth) maxWidth = eachWidth;
- if (maxHeight < eachHeight) maxHeight = eachHeight;
- }
-
- totHeight = GetRowCount() * (maxHeight ) ;
- totWidth = GetColumnCount() * (maxWidth + charWidth) ;
-
- wxSize sz = DoGetSizeFromClientSize( wxSize( totWidth , totHeight ) ) ;
- totWidth = sz.x ;
- totHeight = sz.y ;
-
- // 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