// and also wide enough for its label
int widthLabel;
- GetTextExtent(wxStripMenuCodes(GetLabel()), &widthLabel, NULL);
+ GetTextExtent(GetLabelText(), &widthLabel, NULL);
widthLabel += RADIO_SIZE; // FIXME this is bogus too
if ( widthLabel > width )
width = widthLabel;
}
}
+int wxRadioBox::GetItemFromPoint(const wxPoint& pt) const
+{
+ const unsigned int count = GetCount();
+ for ( unsigned int i = 0; i < count; i++ )
+ {
+ RECT rect = wxGetWindowRect((*m_radioButtons)[i]);
+
+ if ( rect.left <= pt.x && pt.x < rect.right &&
+ rect.top <= pt.y && pt.y < rect.bottom )
+ {
+ return i;
+ }
+ }
+
+ return wxNOT_FOUND;
+}
+
// ----------------------------------------------------------------------------
// radio box drawing
// ----------------------------------------------------------------------------