Nokia N97 SDK
Example Applications Guide

Pop-up list Example

1. About this Example
2. User Interface
3. Design and implementation


1. About this Example

This tutorial explains how to use the pop-up list control for Avkon applications. Pop-up list control is displayed as a pop-up window including a listbox that provides several styles. The user can select an item or items from this pop-up list.

In the pop-up list example application, the following styles are provided.

Single item Standard (1 row = 1 item)
Single item with graphic & head title A bitmap icon is shown on each item, and a head title is shown at the top of the pop-up list.
Double item with large icon Double pop-up list with a large bitmap icon.

1.1 APIs demonstrated

The following UML diagram shows key classes of the Pop-up List sample application.

image_poplist001.gif


1.2 Prerequisites

The pop-up list example application shows how to implement the pop-up list user interface in your application. To use the pop-up list control in an application, it is necessary that application programmers understand the following topics:


2. User Interface

This section shows how the pop-up list control is displayed to users and explains how to use them with the pop-up list example application.

All of the pop-up list examples can be opened from the Options menu in the initial view. To display the Options menu, press the left soft key in initial view. Pressing the right softkey shows all examples.

2.1 Single item pop-up list

To display a pop-up list with single items, select Single item in the Options menu.

image_poplist002.gif

2.2 Single item with graphic and head title

To display single items with a graphic and head title, select Single item with G (Head) in the Options menu.

image_poplist005.gif

2.3 Double item with large icon

To display double items with a large icon, select Double item with LI in the Options menu.

image_poplist014.gif

3. Design and implementation

3.1 Sequence for using the pop-up list class

The following figure shows the sequence for using the pop-up list class:

image_poplist019.gif

At first, an instance of a listbox object is created. Then, when the CAknPopupList object is created (instantiated), the handle of the listbox object is passed to CAknPopupList at the construction phase. Then ExecuteLD is called to show the pop-up list.

When the user selects an item in a pop-up list, the code of ExecuteLD returns to caller. To get the index of the selected item by application code, the CurrentItemIndex is called. Just like a normal dialog, the pop-up list has Active Object in itself.


© Nokia 2009

Back to top