Symbian3/SDK/Source/GUID-11C24609-3B6D-4B44-B003-FB0C07444A9E.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 21 Jan 2010 18:18:20 +0000
changeset 0 89d6a7a84779
permissions -rw-r--r--
Initial contribution of Documentation_content according to Feature bug 1266 bug 1268 bug 1269 bug 1270 bug 1372 bug 1374 bug 1375 bug 1379 bug 1380 bug 1381 bug 1382 bug 1383 bug 1385

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
	Nokia Corporation - initial contribution.
Contributors: 
-->  <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"><concept id="GUID-11C24609-3B6D-4B44-B003-FB0C07444A9E" xml:lang="en"><title>Scroll
pane</title><prolog><metadata><keywords></keywords></metadata></prolog><conbody>
<p>With any list, grid or other component that can be scrolled vertically,
a scrollbar appears on the right-hand side of the component. The scrollbar
is displayed also on pop-up components.</p>
<fig id="GUID-BD8A5FCD-048E-41AF-BA17-A38B689141D9">
<title>Scroll pane with scrollbar</title>
<image href="GUID-F8A7F4CB-011C-425D-83B4-13BD67AA21B7_d0e53932_href.png" scale="33" placement="inline"></image>
</fig>
<ul>
<li><p>The placement of the scroll handle on the scrollbar reflects the position
of the focus on the scrolling content.</p></li>
<li><p>The size of the scroll handle reflects the number of displayed items
relative to the total number of items on the scrolled component.</p></li>
<li><p>The scrollbar is displayed even when all items on the component can
be displayed in the same view without scrolling. When this is the case, the
scroll handle is displayed at the maximum size. The only exception is the
Application Shell, where scrollbar is not displayed if all items fit the same
view.</p></li>
</ul>
<section id="GUID-054FE843-7681-40D9-ACA7-47122BC3107B"><title>Scrollbars
in Touch UI</title><p>In touch devices based on the Symbian platform,
scrollbars (vertical and horizontal) have a touch-enabled scroll box. The
hardware keys (Arrow keys) can also be used for scrolling when the scrollbars
are visible. The scrolling movement on the screen is smooth.</p><p>In order
for the scrollbar to be more usable with touch, the actual scrollbar area
is wider than the visible scrollbar. When the user scrolls, the scrollbar
has a related effect to indicate the scrolling. Because the actual area of
scrollbar is wider, the items appearing on that area in scrollable list, grids,
viewers etc. cannot be touch-enabled, e.g. list icons in column D cannot be
tapped.</p></section>
<section id="GUID-87093F25-CFC3-4D71-A5EF-006C6425C65D"><title>Using
scrollbars in C++ applications</title><p>The API to use for creating the scrollbar
component is the Scroller
API.</p><p>To use a scrollbar in your application, first create a scrollbar
frame using the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCEikScrollBarFrame.html" format="application/java-archive"><codeph>CEikScrollbarFrame</codeph></xref>. All scrollbar operations are executed via this scrollbar frame.
These operations include creating and destroying the scrollbar, setting its
visibility, and adjusting the scrollbar's model. The scrollbar itself can
be created using the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCEikScrollBarFrame.html#81980f8db36253fc89fb7ebbfa316b4d" format="application/java-archive"><codeph>CreateDoubleSpanScrollBarsL()</codeph></xref> in the class <codeph>CEikScrollBarFrame</codeph>.
The class for the scrollbar is <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCAknDoubleSpanScrollBar.html" format="application/java-archive"><codeph>CAknDoubleSpanScrollBar</codeph></xref>. For implementation information, see Creating
a scrollbar.</p><p>Scrollbar models encapsulate the range of integers
which a scrollbar can represent, from zero to n, and the current position
of the scrollbar thumb within that range. To set the scrollbar model, use
the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classTAknDoubleSpanScrollBarModel.html" format="application/java-archive"><codeph>TAknDoubleSpanScrollbarModel</codeph></xref>. For information on updating the scrollbar's position and size using
the scrollbar model, see Updating
ArrowHead scrollbar attributes and Updating
DoubleSpan scrollbar attributes.</p><p>You can control the scrollbar
visibility using the method <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCEikScrollBarFrame.html#63d2cba6f1261f9c56dd7a98499fceda" format="application/java-archive"><codeph>SetScrollbarVisibilityL()</codeph></xref> in the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classCEikScrollBarFrame.html" format="application/java-archive"><codeph>CEikScrollbarFrame</codeph></xref>.</p><p>To observed scrollbar events,
use the class <xref href="jar:GUID-759FBC7F-5384-4487-8457-A8D4B76F6AA6.jar!/html/classMEikScrollBarObserver.html" format="application/java-archive"><codeph>MEikScrollbarObserver</codeph></xref>. For implementation information, see Observing
scrollbar events.</p></section>
</conbody></concept>