keyboard/focus handling improved a bit more:

1. wxFrame doesn't give focus to anything at all on activation
2. last control restored more often (some problems still persist)
3. buttons process enter
4. text controls with wxTE_PROCESS_TAB still leave TAB work as dialog
   navigation key if the event wasn't processed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-20 21:51:15 +00:00
parent 7c54578678
commit 319fefa910
6 changed files with 67 additions and 34 deletions

View File

@@ -1107,13 +1107,13 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
break;
case WXK_TAB:
// only produce navigation event if we don't process TAB ourself or
// if it's a Shift-Tab keypress (we assume nobody will ever need
// this key combo for himself)
// always produce navigation event - even if we process TAB
// ourselves the fact that we got here means that the user code
// decided to skip processing of this TAB - probably to let it
// do its default job.
//
// NB: Notice that Ctrl-Tab is handled elsewhere and Alt-Tab is
// handled by Windows
if ( event.ShiftDown() || !(m_windowStyle & wxTE_PROCESS_TAB) )
{
wxNavigationKeyEvent eventNav;
eventNav.SetDirection(!event.ShiftDown());