From: Vadim Zeitlin Date: Wed, 17 Aug 2005 13:13:42 +0000 (+0000) Subject: also added a check of choice selection in idle time (similar to last check in for... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d6bbc10c94713f682a729672ee2b5027301d2813 also added a check of choice selection in idle time (similar to last check in for combobox) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35210 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index 1e74712516..b113708fdb 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -1068,6 +1068,19 @@ void MyPanel::OnIdle(wxIdleEvent& event) s_selCombo = sel; } + static int s_selChoice = INVALID_SELECTION; + sel = m_choice->GetSelection(); + if ( sel != s_selChoice ) + { + if ( s_selChoice != INVALID_SELECTION ) + { + wxLogMessage(_T("EVT_IDLE: choice selection changed from %d to %d"), + s_selChoice, sel); + } + + s_selChoice = sel; + } + event.Skip(); }