]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/radiobox.cpp
Reverted part of rev 1.92. It causes probelms on Windows when
[wxWidgets.git] / src / msw / radiobox.cpp
index 3f320fd6636a14cfa2a48895c10044e5da048982..66534b1e2ad23d0a99b148c7a07cf4be5db4a368 100644 (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
 // ----------------------------------------------------------------------------