From: Robin Dunn Date: Wed, 10 Jul 2002 21:12:03 +0000 (+0000) Subject: Ensure that the wxSTC gets the focus when clicked. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cb1871cabf00451eeae75d295f27145d66644ef6 Ensure that the wxSTC gets the focus when clicked. #if'd out my wxPopupWindow meanderings and just use a simple wxListBox for the AutoComplete window. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/contrib/src/stc/PlatWX.cpp b/contrib/src/stc/PlatWX.cpp index 6cb4b7cefa..8edc3bf5e7 100644 --- a/contrib/src/stc/PlatWX.cpp +++ b/contrib/src/stc/PlatWX.cpp @@ -637,7 +637,7 @@ void Window::SetCursor(Cursor curs) { #else wxCursor wc = wxCursor(cursorId) ; #endif - GETWIN(id)->SetCursor(wc); + GETWIN(id)->SetCursor(wc); } @@ -650,7 +650,7 @@ void Window::SetTitle(const char *s) { // Helper classes for ListBox -#if defined(__WXMAC__) +#if 1 // defined(__WXMAC__) class wxSTCListBoxWin : public wxListBox { public: wxSTCListBoxWin(wxWindow* parent, wxWindowID id) diff --git a/contrib/src/stc/stc.cpp b/contrib/src/stc/stc.cpp index ffefb86119..0a8ccd6bc1 100644 --- a/contrib/src/stc/stc.cpp +++ b/contrib/src/stc/stc.cpp @@ -1877,6 +1877,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); diff --git a/contrib/src/stc/stc.cpp.in b/contrib/src/stc/stc.cpp.in index 17f06ad588..fd17cb2e76 100644 --- a/contrib/src/stc/stc.cpp.in +++ b/contrib/src/stc/stc.cpp.in @@ -330,6 +330,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); diff --git a/src/stc/PlatWX.cpp b/src/stc/PlatWX.cpp index 6cb4b7cefa..8edc3bf5e7 100644 --- a/src/stc/PlatWX.cpp +++ b/src/stc/PlatWX.cpp @@ -637,7 +637,7 @@ void Window::SetCursor(Cursor curs) { #else wxCursor wc = wxCursor(cursorId) ; #endif - GETWIN(id)->SetCursor(wc); + GETWIN(id)->SetCursor(wc); } @@ -650,7 +650,7 @@ void Window::SetTitle(const char *s) { // Helper classes for ListBox -#if defined(__WXMAC__) +#if 1 // defined(__WXMAC__) class wxSTCListBoxWin : public wxListBox { public: wxSTCListBoxWin(wxWindow* parent, wxWindowID id) diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index ffefb86119..0a8ccd6bc1 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -1877,6 +1877,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown()); diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index 17f06ad588..fd17cb2e76 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -330,6 +330,7 @@ void wxStyledTextCtrl::OnSize(wxSizeEvent& evt) { } void wxStyledTextCtrl::OnMouseLeftDown(wxMouseEvent& evt) { + SetFocus(); wxPoint pt = evt.GetPosition(); m_swx->DoButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(), evt.ShiftDown(), evt.ControlDown(), evt.AltDown());