×
Namespaces

Variants
Actions

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

From Nokia Developer Wiki
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.
46 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.

×