Symbian 对话框用法
2010-03-05 06:11:00 来源:WEB开发网多页对话框资源定义
与单页对话框不同,多页对话框定义了一个pages list(单页对话框是item列表)。软键定义一般是
针对整个对话框的,而不是针对每个页。
示例如下:
RESOURCE DIALOG r_multipage_form
{
flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder |
EEikDialogFlagCbaButtons;
buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
pages = r_multipage_form_pages;
}
RESOURCE ARRAY r_multipage_form_pages
{
items =
{
PAGE
{
id = EAknExFormPageCtrlIdPage01;
text = qtn_multipage_form_label_page1;
form = r_multipage_form_text_field_form;
},
PAGE
{
id = EAknExFormPageCtrlIdPage02;
text = qtn_multipage_form_label_page2;
form = r_aknexform_text_number_field_form;
},
. . .(Page列表)
};
}
RESOURCE FORM r_multipage_form_text_field_form
//定义上例中第一个Page中Form的资源 注:这里的资源是Form不是Dialog类型
{
flags = EEikFormUseDoubleSpacedFormat;
items =
{
DLG_LINE
{
type = EEikCtEdwin;
prompt = qtn_multipage_form_label_edwin;
id = EAknExFormDlgCtrlIdEdwin11;
itemflags = EEikDlgItemTakesEnterKey |
EEikDlgItemOfferAllHotKeys;
control = EDWIN
{
flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
width = AKNEXFORM_EDWIN_WIDTH;
lines = AKNEXFORM_EDWIN_LINES;
maxlength = EAknExFormEdwinMaxLength;
// added to limit expanding in forms.
// If you want full screen use 5 here
max_view_height_in_lines = 5;
// if you have the line above, you must have this.
更多精彩
赞助商链接