
|
March 2005 |
|
|
| |
|
The Symbian OS UIQ 2.1 SDK has a large number of predefined controls that can be used when building applications. It's also possible to create new custom controls that can be used in an application in the same manner as predefined controls. The custom controls can, for example, be used in resource files to specify the contents of a dialog. The downloadable example application shows how to create a simple custom control. The example application shows how to create a simple "compass" control that lets a user specify eight possible directions: N, NW, W, SW, S, SE, E, NE. The exact appearance of the control will depend on the context, but it will typically look like this:
To build this Compass example for the smartphone, use the following: $ bldmake bldfiles
class CCompass : public CCoeControl class CCompassContainer : public CCoeControl, Some virtual methods in CoeControl have been overridden to specify the exact behavior of the control, for example, HandlePointerEventL, FocusChanged and CountComponentControls. The compass control is defined in the resource header file in order to let the user of the control specify a direction and a height: STRUCT COMPASSCONTROL To specify the compass control in the resource file, the following is done: DLG_LINE More information about Controls can be found in the UIQ 2.1 SDK at:
| |
Copyright © 2001 - 2009 Sony Ericsson Mobile Communications AB. All Rights Reserved.