Update all controls using in-place editors to handle Escape/Return correctly.

Define EVT_CHAR_HOOK handlers to ensure that pressing Escape/Return while an
in-place edit control is active affects only it and is not used for the
keyboard navigation.

Closes #9102.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69897 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-02 00:50:41 +00:00
parent 4d7bc8e761
commit 64ac3db840
7 changed files with 143 additions and 9 deletions

View File

@@ -402,6 +402,10 @@ public:
wxTextCtrl *GetText() const { return m_text; }
// Check if the given key event should stop editing and return true if it
// does or false otherwise.
bool CheckForEndEditKey(const wxKeyEvent& event);
// Different reasons for calling EndEdit():
//
// It was called because:
@@ -557,6 +561,7 @@ public:
// called to switch the selection from the current item to newCurrent,
void OnArrowChar( size_t newCurrent, const wxKeyEvent& event );
void OnCharHook( wxKeyEvent &event );
void OnChar( wxKeyEvent &event );
void OnKeyDown( wxKeyEvent &event );
void OnKeyUp( wxKeyEvent &event );