Hi,
I am trying to view and hide the CBA in my application depending on the context. I am doing the following but the problem is when i show then hide then show again the custom CBA i get a NULL cba from CEikButtonGroupContainer::Current();
Any suggestion?Code:void CMyAppView::HideCustomCBA() { CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); cba->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY); cba->MakeVisible(EFalse); cba->DrawNow(); } void CMyAppView::ShowCustomCBA() { // when this is called the first time things work fine // But when called again after a call to HideCustomCBA() cba is returned as NULL CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current(); cba->SetCommandSetL(R_CUSTOM_CBA); cba->MakeVisible(ETrue); cba->DrawNow(); iPrevOrdinalPos = cba->DrawableWindow()->OrdinalPosition(); cba->DrawableWindow()->SetOrdinalPosition(0); }
regards
AF

Reply With Quote

