Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to handle events in custom controls

From Wiki
Jump to: navigation, search
Article Metadata
Code Example
Source file:
Tested with
Devices(s): N73, N95 8Gb
Platform(s): S60 3rd, S60 3rd FP1
Created: Den123 (23 Mar 2008)
Last edited: hamishwillee (30 May 2013)



The original article is in Russian. You can find it here.

This example demonstrates how to use container controls, how to handle events and how to use custom controls in the dialogs.

CompoundSmileCtrls.png CompoundSmileCtrls2.PNG

Source code of this project:


It is a container control. It consists of two objects: CSmileControl and CSliderGroup. Method SizeChanged() calculates size and position of these embedded parts. Depending on the sizes, the embedded parts are displayed from top to bottom or from left to right. This control supports events handling - events are passed to the embedded control CSliderGroup. This control also displays the background of the current theme.


This non-focusing control doesn't supports events handling. It's just displays the smile, considering coefficients of the deformation (iDeltaX, iDeltaY).


It is a container control. It consists of two sliders for defining two values. This control supports events handling. There are two possible result of event: focus changed or value of the slider changed.


This simple control is used for displaying value ( dX or dY ) and for changing this value.

This page was last modified on 30 May 2013, at 04:38.
43 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.