(Difference between revisions)

Moving scrollbar thumb on CEikScrollBarFrame

From Nokia Developer Wiki
Jump to: navigation, search
hamishwillee (Talk | contribs)
m (Hamishwillee - Bot update - Fix links)
lpvalente (Talk | contribs)
m (Lpvalente -)
Line 1: Line 1:
[[Category:Symbian C++]][[Category:Code Snippet]][[Category:UI]][[Category:Code Snippet]][[Category:S60 3rd Edition FP1]]
{{ArticleMetaData <!-- v1.2 -->
{{ArticleMetaData <!-- v1.2 -->
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
|sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) -->
Line 70: Line 74:
* [[Archived:Using scrollbars in Symbian container control]]
* [[Archived:Using scrollbars in Symbian container control]]
[[Category:Symbian C++]][[Category:Code Snippet]][[Category:UI]][[Category:Code Snippet]]

Latest revision as of 21:29, 4 August 2012

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): Nokia N95 8GB
Platform(s): S60 3rd Edition, FP1
S60 3rd Edition FP1
Keywords: CEikScrollBarFrame, TAknDoubleSpanScrollBarModel, TAknDoubleSpanScrollBarModel::SetFocusPosition(), CEikScrollBarFrame::SetVFocusPosToThumbPos()
Created: tapiolaitinen (01 Apr 2008)
Last edited: lpvalente (04 Aug 2012)


[edit] 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.

[edit] MMP file

The following libraries are required:

LIBRARY eikcoctl.lib

[edit] Header file

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

[edit] 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.
// Move the scrollbar thumb to model position

[edit] Postconditions

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

[edit] See also

This page was last modified on 4 August 2012, at 21:29.
84 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.


Thank you!

We appreciate your feedback.