Hi,
I have the following code
The problem with this code is that when i press the down arrow key for the first time the buttons(key events) on the text control(iMsgEditor) do not work. However on subsequent attempts it works fine. I fail to understand the fault in my own logic :(.Code:if ( iNumEditor->IsFocused() ) { if ( ((aKeyEvent.iCode == EKeyDownArrow) || (aKeyEvent.iCode == EKeyUpArrow)) && aType == EEventKey ) { iNumEditor->SetFocus( EFalse ); iIMsgEditor->SetFocus( ETrue ); iFocusControl = iIMsgEditor; return EKeyWasConsumed; } else { iFocusControl->OfferKeyEventL( aKeyEvent, aType ); } } if ( iIMsgEditor->IsFocused() ) { if ( ((aKeyEvent.iCode == EKeyDownArrow) || (aKeyEvent.iCode == EKeyUpArrow)) && aType == EEventKey ) { iIMsgEditor->SetFocus( EFalse ); iNumEditor->SetFocus( ETrue ); iFocusControl = iNumEditor; return EKeyWasConsumed; } else { iFocusControl->OfferKeyEventL( aKeyEvent, aType ); } } return EKeyWasNotConsumed;
Sorry for the long post. Would be glad if somebody helps me out. And Btw the point of the logic is to change the focus of the editors on arrow key up and down.
Thanks,
Eswar.



