With wxTE_PROCESS_TAB, tabs are now inserted in the text control

by default. The new Navigate function can be used to do navigation
programmatically.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-06-15 14:03:06 +00:00
parent 1ab608ee00
commit 5f6cfda79f
7 changed files with 61 additions and 39 deletions

View File

@@ -1985,21 +1985,10 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
break;
case WXK_TAB:
// 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.
if ( !(m_windowStyle & wxTE_PROCESS_TAB))
{
wxNavigationKeyEvent eventNav;
eventNav.SetDirection(!event.ShiftDown());
eventNav.SetWindowChange(event.ControlDown());
eventNav.SetEventObject(this);
if ( GetParent()->GetEventHandler()->ProcessEvent(eventNav) )
if (Navigate(!event.ShiftDown(), event.ControlDown()))
return;
event.Skip() ;
return;
}
break;
}