×
Namespaces

Variants
Actions

Talk:How to Handle Pointer Events in a Custom Control

From Nokia Developer Wiki
Jump to: navigation, search
{{{width}}}
30 Sep
2009
Article Review by savaj (20090930)

Handling pointer events in custom controls is often require during developing custom GUI applications. This article demonstrates how pointer position will validated against the control rectangle and the pointer events will be routed to appropriate control. The article is well explained and useful to beginners.

This piece of code works, but logically error. CCoeControl::HandlePointerEventL(aPointerEvent); will dispatch the pointer event to proper control automatically, so the if blocks just redo the logical already provided by CCoeControl. And thus give a bad impression to developer that they have to maintain the pointer dispatching stuff by themselves in a container.(Just like the key process)

You need to do the dispatch by yourself only when the control contained by the container can't be accessed by container's CCoeControl *ComponentControl(TInt aIndex) const; function. Most time that's an error

User:bibu2651 17:10, 26 Jan 2010

 
×