Join Now
Quality Rating:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)
Expertise Level:
  • Currently 0.0 / 5
(0.0 / 5 - 0 votes cast)

This page was last modified 07:50, 7 April 2008.

CS000885 - Moving scrollbar thumb

From Forum Nokia Wiki


ID CS000885 Creation date April 7, 2008
Platform S60 3rd Edition, FP1 Tested on devices Nokia N95 8GB
Category Symbian C++ Subcategory UI


Keywords (APIs, classes, methods, functions): CEikScrollBarFrame, TAknDoubleSpanScrollBarModel, TAknDoubleSpanScrollBarModel::SetFocusPosition(), CEikScrollBarFrame::SetVFocusPosToThumbPos()

Overview

This snippet demonstrates how to move the scrollbar thumb to a certain position. This is useful, for example, after an external scroll (such as a scroll caused by program code).

This snippet can be self-signed.

MMP file

The following libraries are required:

LIBRARY  eikcoctl.lib

Header file

#include <eiksbfrm.h>  // CEikScrollBarFrame
#include <eikscrlb.h>  // TAknDoubleSpanScrollBarModel
CEikScrollBarFrame* iScrollBarFrame;
TAknDoubleSpanScrollBarModel iVModel;

Source file

The following code updates the scrollbar model and moves the vertical scrollbar thumb to a position specified by the model. The code could be written in CMyContainer::OfferKeyEventL(), for example.

// Update the model. Naturally, number 10 would be calculated, not specified
// as a magic number constant.
iVModel.SetFocusPosition(10);
// Move the scrollbar thumb to model position
iScrollBarFrame->SetVFocusPosToThumbPos(iVModel.FocusPosition());

Postconditions

The thumb of the vertical scrollbar moves to the position specified by the scrollbar model.

See also

Related Discussions
Thread Thread Starter Forum Replies Last Post
Obtaining additional network information drazvan Symbian Tools & SDKs 22 2004-05-10 09:38
More Symbian Getting Started... davidmanpearl General Symbian C++ 6 2006-03-23 02:17
Application wizard Amilael General Symbian C++ 3 2006-07-17 06:33
Expat parser not reading the attributes in the XML ?? divyas General Symbian C++ 3 2007-02-28 07:28
Symbian C++ SDK 3rd ed and ARMI Release? srigans1 Symbian Tools & SDKs 5 2006-06-24 02:36
 
Powered by MediaWiki
     
     RDF Facets:
     
     
     qfnZtypeQUqfnTypeZCommunityContentQ
     qfnZtypeQUqfnTypeZWebpageQ
     qfnZtypeQUqfnTypeZWikiContentQ
     qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX