I need to add scroller in ma container so tat i can scroll through all labels and editors which are there in container.
I have coded this..
void CMyContainer::CreateScrollBars()
{
iScrollBarFrame = new (ELeave) CEikScrollBarFrame(this, NULL);
iScrollBarFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOn);
iScrollBarFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::ENormalScrollBar);
TEikScrollBarFrameLayout layout;
iVDsSbarModel.iScrollSpan = 310;
iVDsSbarModel.iThumbSpan = 10;
iVDsSbarModel.iThumbPosition = 0;
TRect t1Rect = TRect(0,0,Rect().Width(),Rect().Height());
TRect t2Rect = TRect(0,0,Rect().Width(),310);
iScrollBarFrame->TileL(&iHDsSbarModel, &iVDsSbarModel,t1Rect,t2Rect, layout);
iScrollBarFrame->DrawScrollBarsNow();
ActivateL();
}
and
void CMyView:oActivateL( const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,const TDesC8& /*aCustomMessage*/)
{
if(!iContainer)
{
iContainer = CMyContainer::NewL(ClientRect());
iContainer->SetMopParent(AppUi());
//iContainer->SetMopParent(this);
iContainer->CreateScrollBar();
AppUi()->AddToStackL( *this, iContainer );
}
}
but still i cant see any scroller or any scroller effect. Can anybody please tell me how what else should i do to have scroller in my container.
Thanx in advance.
regards,
Sunil Bhardwaj

oActivateL( const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,const TDesC8& /*aCustomMessage*/)
Reply With Quote

