How to create multi-page dialogs in Symbian C++
Article Metadata
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.
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;
};
}
};
}


19 Sep
2009
Dialog-Box is a special window on your device screen, which can be used to give information to the user or to alert user about some error or to get some input from user etc. Dialog is a basic aspect of any application.
The article has represented the way to create multiple dialogs with code snippest which should be included in dialog resource. The code creates multiple dialogs in same page, which can be accessed by navigation pane provided on the top. The code is presented with required explaination.
The article deals with the basic aspect of Symbian application and can be useful to beginners.
28 Sep
2009
Multi-page dialogs is useful when user have number of fields that can not be fit to one screen. Here multi-page dialog does not mean the dialog that have scroll-bar to scroll between multiple pages, but framework provides tabs to navigates to each page. This type of dialog can be created using DIALOG resource. Multi-page dialogs define a list of pages instead of items in single-page dialogs. The soft-keys defined in the resource are generic to the entire dialog - not to each page.
The article describes a way to create multi-page dialog with DIALOG resource. The code snippet useful to beginners to implement multi-page dialog.