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:
@@ -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
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user