Fix TAB handling for controls with wxTE_PROCESS_ENTER in wxMSW
When this style is specified, TAB has to be handled manually as well and we do it by calling our Navigate() method explicitly. But for it to work correctly we need to pretend that it's called in response to a real TAB press by specifying FromTab flag and the code forgot to do this -- just add the missing flag to fix it now. In particular, this ensures that the special code handling radio buttons in wxControlContainer::HandleOnNavigationKey() is really executed and fixes a bug with pressing TAB on a wxTextCtrl with wxTE_PROCESS_ENTER before a radio button group would select the first radio button of this group instead of jumping to the currently selected button. Closes #18392.
This commit is contained in:
@@ -2080,7 +2080,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
|
||||
{
|
||||
if ( ::GetFocus() == GetHwnd() )
|
||||
{
|
||||
int flags = 0;
|
||||
int flags = wxNavigationKeyEvent::FromTab;
|
||||
if (!event.ShiftDown())
|
||||
flags |= wxNavigationKeyEvent::IsForward ;
|
||||
if (event.ControlDown())
|
||||
|
Reference in New Issue
Block a user