Hello!! I have two controls and I want to change focus between them. I look for some ideas in the sdk and I try to do the same as in the editor aplication. I define the next function to pass the focus to the control in function of the generated event:

void CConfigContainer2::FocusTo(TInt aCommand)
{
switch(aCommand)
{
case ECmdiNum:
iMens->SetFocus(EFalse);
iNum->SetFocus(ETrue);
break;
case ECmdiMens:
iNum->SetFocus(EFalse);
iMens->SetFocus(ETrue);
break;
default:
break;
}
}

and then another function to write in the edwin controls. ( iNum and iMens are edwind controls):

TKeyResponse CConfigContainer2::OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType)
{
if (iMens)
{
if (iMens->IsFocused())
{
return iMens->OfferKeyEventL(aKeyEvent, aType);
}
}
if (iNum)
{
if (iNum->IsFocused())
{
return iNum->OfferKeyEventL(aKeyEvent, aType);
}
}
return EKeyWasNotConsumed;
}

In this another function I active the control depends on the event:
CCoeControl* CConfigContainer2::ComponentControl(TInt aIndex) const
{
switch ( aIndex )
{
case ELabel1:
return iLabel;
case ELabel2:
return iLabel2;
case ELabel3:
return iLabel3;
case ENum:
return iNum;
case EMens:
return iMens;
default:
return NULL;
}
}

In this function I return the number of controls that there are in the container:

TInt CConfigContainer2::CountComponentControls() const
{
return 5; // return nbr of controls inside this container
}

All is well. I display all of the controls and there is no error but when I try to change focus between this edwinds the focus does not change. At the beggining I pass the focus to iNum with iNum->SetFocus(ETrue); I try to change the initial focus to iMens but it keeping on not to change. Someone could tell me where the error is? Many thanks!!