]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/menucmn.cpp
set selection before setting focus to the control in SetFocusFromKbd() (patch 726361)
[wxWidgets.git] / src / common / menucmn.cpp
index 7ce3d36fdea66a15aac5887ccb05b824472ff37b..5e9ea0f289ebca4f233ed53186fcb20cf7cc297b 100644 (file)
@@ -520,6 +520,15 @@ wxMenuItem *wxMenuBase::FindChildItem(int id, size_t *ppos) const
     return item;
 }
 
+// find by position
+wxMenuItem* wxMenuBase::FindItemByPosition(size_t position) const
+{
+    wxCHECK_MSG( position < m_items.GetCount(), NULL,
+                 _T("wxMenu::FindItemByPosition(): invalid menu index") );
+
+    return m_items.Item( position )->GetData();
+}
+
 // ----------------------------------------------------------------------------
 // wxMenu helpers used by derived classes
 // ----------------------------------------------------------------------------