Scrolling an editor screen without highlighting the contents using Symbian C++
S60 5th Edition
This article explains how to remove the highlight/selection of contents when the editor is scrolled by moving the stylus over the text area.
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.
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
// Call base class HandlePointerEventL()
The following images show the difference:
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.
Using the above code snippet, this problem can be eliminated.