// Purpose: implements mac carbon wxSearchCtrl
// Author: Vince Harron
// Created: 2006-02-19
-// RCS-ID: $Id: srchctrl.cpp 54820 2008-07-29 20:04:11Z SC $
+// RCS-ID: $Id$
// Copyright: Vince Harron
-// License: wxWindows licence
+// Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
{
return dynamic_cast<wxSearchWidgetImpl*> (m_peer);
}
-
+
wxSearchCtrl::~wxSearchCtrl()
{
delete m_menu;
{
wxCommandEvent event(wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, m_windowId );
event.SetEventObject(this);
+
+ // provide the string to search for directly in the event, this is more
+ // convenient than retrieving it from the control in event handler code
+ event.SetString(GetValue());
+
return ProcessCommand(event);
}