]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ctrlsub.cpp
Don't use "Cancel" button in the about dialog of the listctrl sample.
[wxWidgets.git] / src / common / ctrlsub.cpp
index 388af3e6ffb77501e18589e4ae79c5aed5418838..7f35cfa947b02a46c2bdd3f5281eaf56eeada0f7 100644 (file)
@@ -292,4 +292,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