]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ctrlsub.cpp
skip apple options
[wxWidgets.git] / src / common / ctrlsub.cpp
index 388af3e6ffb77501e18589e4ae79c5aed5418838..7bf15a92956b62ac6e7d0701f6f992a17d65824b 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Vadim Zeitlin
 // Modified by:
 // Created:     22.10.99
-// RCS-ID:      $Id$
 // Copyright:   (c) wxWidgets team
 // Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -292,4 +291,19 @@ wxControlWithItemsBase::InitCommandEventWithItems(wxCommandEvent& event, int n)
     }
 }
 
+void wxControlWithItemsBase::SendSelectionChangedEvent(wxEventType eventType)
+{
+    const int n = GetSelection();
+    if ( n == wxNOT_FOUND )
+        return;
+
+    wxCommandEvent event(eventType, m_windowId);
+    event.SetInt(n);
+    event.SetEventObject(this);
+    event.SetString(GetStringSelection());
+    InitCommandEventWithItems(event, n);
+
+    HandleWindowEvent(event);
+}
+
 #endif // wxUSE_CONTROLS