|
August 2005 |
|||||
|
There are a number of controls that can be built and used without the need to define them in resources. This Dynamic GUI Elements example shows how to use them in your application, as well as creating a new control that uses CEikTextListBox object. In a view where this new control is used, there are also a number of different buttons that use this object's functionality. They simply display information every time one of the buttons is pressed. Download Dynamic GUI Elements example>> In the application example, there are four views with different objects used in each one (shown in the screenshots below). Each object's type has its own build function, to make the code easy to copy and paste into other applications. Controls are put into controls table, to make the code cleaner. Some of the controls can receive text inputs and these objects are handled separately in the functions InputCapabilities and OfferKeyEventL. In the function HandleControlEventL, a control that has just been tapped on the smartphone screen is set to be a "currently focused object" control, and its focus is set to true. An old "currently focused object" has its focus set to false, so there is always only one object that has focus.
To build the DynGuiElem example for a Sony Ericsson smartphone, use the following: $ bldmake bldfiles The example also has a small program (supply.bat) that can call these commands for you. It will also start deploying .sis file on the smartphone. You should edit it before first use to update paths, so they will reflect your folders.
| |||||





Technorati
