Namespaces
Variants
Actions

How to create multi-page dialogs in Symbian C++

Jump to: navigation, search
Article Metadata

Article
Created: eswar_illuri (10 May 2007)
Last edited: hamishwillee (25 Jan 2012)

This article explains how to create a multi-page dialog using Symbian C++.

Overview

A Dialog can be split into logical sections by Multipage Dialog. This allows the presentation of a dialog in an organized manner, with labeled tabs displayed in the navigation pane to clearly indicate the purpose of each page to the user.

Output.JPG

The framework provides the tabs and handles them automatically—you just need to specify a pages field instead of an items field in your DIALOG resource. You also need to make sure that the dialog fills the entire application client rectangle by specifying the EEikDialog-FlagFillAppClientRect flag. Otherwise, the tabs will appear but will be dimmed.

Example

RESOURCE DIALOG r_multipage_dialog
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagCbaButtons |
EEikDialogFlagFillAppClientRect | EEikDialogFlagWait;
buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
pages = my_pages;
}

The pages field of the resource is set to equal an ARRAY resource, my_pages. The array resource should also be defined in the resource file:

RESOURCE ARRAY my_pages
{
items =
{
PAGE
{
text = "Name";
lines = my_name_lines;
},
PAGE
{
text = "Age";
lines = my_age_lines;
}
};
}

The ARRAY has two PAGE resources, each page containing:

  • text, which will appear on the tab.
  • lines, which refers to an ARRAY of DLG_LINE resources.
RESOURCE ARRAY my_name_lines
{
items =
{
DLG_LINE
{
id = EMyAppDlgCIdNameLabel;
type = EEikCtLabel;
control = LABEL
{
txt = "Enter your name:";
};
},
DLG_LINE
{
id = EMyAppDlgCIdNameEditor;
type = EEikCtEdwin;
control = EDWIN
{
avkon_flags = EAknEditorFlagNoEditIndicators;
maxlength = KMaxPlayerNameLength;
};
}
};
}

See also

This page was last modified on 25 January 2012, at 05:44.
91 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved