×
Namespaces

Variants
Actions

Scrolling an editor screen without highlighting the contents using Symbian C++

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic
Compatibility
Platform(s): S60 5th Edition
S60 5th Edition
Article
Keywords: HandlePointerEventL
Created: User:Nokia Developer KB (03 Apr 2009)
Last edited: hamishwillee (01 Aug 2012)

Overview

This article explains how to remove the highlight/selection of contents when the editor is scrolled by moving the stylus over the text area.

Description

As S60 5th Edition devices are touch sensitive, the pointer events can be captured using HandlePointerEventL(). This is also used to handle events like pointer down/up and dragging. Thus a class derived from CCoeControl can implement the HandlePointerEventL() function for customising the pointer event handling.

The highlight/selection can be removed by a call to the function ClearSelectionL() within the function that handles pointer events.

Solution

The following code snippet helps removing the highlight/selection of contents whenever the editor is scrolled by moving the stylus over the text area.

 void <ClassName>::HandlePointerEventL(const TPointerEvent &aPointerEvent)
{
//iEditor is a CEikEdwin control
iEditor->ClearSelectionL();
// Call base class HandlePointerEventL()
CCoeControl::HandlePointerEventL(aPointerEvent);
}

The following images show the difference:

TSS001330 1.jpg

When the pointer (stylus) is placed on the text area and moved, the text area up to the point where the pointer is dragged is selected.

TSS001330 2.jpg

Using the above code snippet, this problem can be eliminated.

This page was last modified on 1 August 2012, at 07:39.
63 page views in the last 30 days.
×