I�m trying to work with the DynamicList example from EMCC.
CDynamicListContainer contains CAknColumnListBox populated with 10 elements, and has the vertical scroll bars visible.
If this container is used in the AppUi::ConstructL everything is fine.
iAppContainer = CDynamicListContainer::NewL(ClientRect());
iAppContainer->SetMopParent(this);
AddToStackL(iAppContainer);
If instead I use my own container in AppUi::ConstructL, and when a menu option is taken, remove my container and use the code below to construct and enable CDynamicListContainer it works except the scroll bars are invisible.
if (iDialGenie)
{
RemoveFromStack(iDialGenie);
delete iDialGenie;
iDialGenie = NULL;
}
iAppContainer = CDynamicListContainer::NewL(ClientRect());
iAppContainer->SetMopParent(this);
AddToStackL(iAppContainer);
CDynamicListContainer::NewL calls SetupScrollBarsL
void CDynamicListContainer::SetupScrollBarsL()
{
iSavedGamesListBox->CreateScrollBarFrameL();
iSavedGamesListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
}
My container only contains two CeikLabel to paint two phrases on the screen.
So how does using my control first, destroy the scroll bars for CDynamicListContainer?
Actually how are you supposed to stop the current control and enable a new one, say in response to a menu option in AppUi::HandleCommandL?