make it possible to associate context help text with individual radiobox items

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-06-11 21:13:13 +00:00
parent dc6588e771
commit dc26eeb36a
9 changed files with 266 additions and 54 deletions

View File

@@ -656,6 +656,23 @@ void wxRadioBox::DoSetSize(int x, int y, int width, int height, int sizeFlags)
}
}
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
// ----------------------------------------------------------------------------