From: Robert Roebling Date: Thu, 23 May 2002 17:57:07 +0000 (+0000) Subject: Redirect wxComboBox::SetFocus to its text field Part I. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/465605e0fdb03081c05d822e795be4b29dbd9a32?ds=inline Redirect wxComboBox::SetFocus to its text field Part I. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/combobox.cpp b/src/mac/carbon/combobox.cpp index 718fe840d6..7bac2630c4 100644 --- a/src/mac/carbon/combobox.cpp +++ b/src/mac/carbon/combobox.cpp @@ -6,7 +6,7 @@ // Created: ??/??/98 // RCS-ID: $Id$ // Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -191,6 +191,11 @@ bool wxComboBox::Show(bool show) return TRUE; } + void wxComboBox::SetFocus() + { + m_text->SetFocus(); + } + void wxComboBox::DelegateTextChanged( const wxString& value ) { } @@ -206,8 +211,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - long style, + int n, const wxString choices[], + long style, const wxValidator& validator, const wxString& name) { @@ -239,7 +244,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, DoSetSize(pos.x, pos.y, csize.x, csize.y); for ( int i = 0 ; i < n ; i++ ) { - m_choice->DoAppend( choices[ i ] ); + m_choice->DoAppend( choices[ i ] ); } // have to disable this window to avoid interfering it with message @@ -423,7 +428,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel) void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); - event.SetInt(GetSelection()); + event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); ProcessCommand(event); diff --git a/src/mac/combobox.cpp b/src/mac/combobox.cpp index 718fe840d6..7bac2630c4 100644 --- a/src/mac/combobox.cpp +++ b/src/mac/combobox.cpp @@ -6,7 +6,7 @@ // Created: ??/??/98 // RCS-ID: $Id$ // Copyright: (c) AUTHOR -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -191,6 +191,11 @@ bool wxComboBox::Show(bool show) return TRUE; } + void wxComboBox::SetFocus() + { + m_text->SetFocus(); + } + void wxComboBox::DelegateTextChanged( const wxString& value ) { } @@ -206,8 +211,8 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, const wxString& value, const wxPoint& pos, const wxSize& size, - int n, const wxString choices[], - long style, + int n, const wxString choices[], + long style, const wxValidator& validator, const wxString& name) { @@ -239,7 +244,7 @@ bool wxComboBox::Create(wxWindow *parent, wxWindowID id, DoSetSize(pos.x, pos.y, csize.x, csize.y); for ( int i = 0 ; i < n ; i++ ) { - m_choice->DoAppend( choices[ i ] ); + m_choice->DoAppend( choices[ i ] ); } // have to disable this window to avoid interfering it with message @@ -423,7 +428,7 @@ bool wxComboBox::SetStringSelection(const wxString& sel) void wxComboBox::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) { wxCommandEvent event(wxEVT_COMMAND_COMBOBOX_SELECTED, m_windowId ); - event.SetInt(GetSelection()); + event.SetInt(GetSelection()); event.SetEventObject(this); event.SetString(GetStringSelection()); ProcessCommand(event);