+#ifdef __WXMAC__
+ // On wxMac we can't depend on the EVT_KILL_FOCUS event to properly
+ // shutdown the edit control when the mouse is clicked elsewhere on the
+ // listctrl because the order of events is different (or something like
+ // that,) so explicitly end the edit if it is active.
+ if ( event.LeftDown() && m_textctrl)
+ {
+ m_textctrl->AcceptChangesAndFinish();
+ }
+#endif
+