Scrollbars and SCrollbar Frames

Login to reply to this topic.
Fri, 2003-10-31 14:38
Joined: 2003-06-12
Forum posts: 104
Hey can anyone help me on how to use SCrollbars?

I have a Container Control that has many controls on it.. so, it would not fit in the entire screen of 3650.. so i need to use SCrollbar Frames?

help on how to use it properly.. tnx in advance?

"its all right, the gun isn't loaded."


Fri, 2003-10-31 21:20
Joined: 2003-10-27
Forum posts: 5
Scrollbars and SCrollbar Frames
Have you checked the AknExScroller example?
Sat, 2003-11-01 11:16
Joined: 2003-06-12
Forum posts: 104
Scrollbars and SCrollbar Frames
The controls in the AknExSCroller examples already has a CreateScrollBarFrameL() function built in to its API so that if you call that function, scroll bars is made already...

Now i;m building a control/container from scratch.. meaning i have to manually create the scrollbars and make them work properly...

"its all right, the gun isn't loaded."

Mon, 2004-12-13 11:14
Joined: 2004-08-09
Forum posts: 30
Scrollbars and SCrollbar Frames
I want to do the same thing Smiley, please help  Roll Eyes
Mon, 2004-12-13 13:34
Joined: 2004-08-09
Forum posts: 30
found something
h file
Code:
CEikScrollBarFrame* iSbFrame;
TEikScrollBarModel iVModel;
TEikScrollBarModel iHModel;
cpp file
Code:
iSbFrame = new (ELeave) CEikScrollBarFrame(this, this);
iSbFrame->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOn);
   iSbFrame->SetTypeOfVScrollBar(CEikScrollBarFrame::EArrowHead);

   iVModel.iScrollSpan = 10;
   iVModel.iThumbSpan = 1;
   iVModel.iThumbPosition = 3;;

   TEikScrollBarFrameLayout layout;
   TRect rect = aRect;
   iSbFrame->TileL(&iHModel, &iVModel, rect, rect, layout);
   iSbFrame->SetVFocusPosToThumbPos(iVModel.iThumbPosition);

   ActivateL();

   iSbFrame->DrawScrollBarsNow();
and when needed I use
iSbFrame->MoveVertThumbTo(pos);
One thing bothers me, do I have to move the controls by myself!? that's seems stupid  Shocked
  • Login to reply to this topic.