×
Namespaces

Variants
Actions

S60设置列表用在对话框上的方法

From Nokia Developer Wiki
Jump to: navigation, search
Article Metadata

文章
beover1984 在 29 Jul 2007 创建
最后由 hamishwillee 在 15 Dec 2011 编辑

在RSS文件中对话框的DLG_LINE写法:

DLG_LINE
{
type = EAknCtLastControlId; //注意这里
id = ESettingList;
control = AVKON_SETTING_ITEM_LIST // 注意这里
{
flags = EAknSettingItemNumberedStyle;
title = SERVICE_SETTING_TITLE;
items =
{
AVKON_SETTING_ITEM
{
//这里没有变化
},
AVKON_SETTING_ITEM
{
.......
}
};
};
}

最后在重写对话框类的CreateCustomControlL(),如果结合从CAknDialog派生的对话框使用可以不加代码就可以实现滚动条

SEikControlInfo CServiceSettingForm::CreateCustomControlL(TInt /*aControlType*/)
{
//iSettingList 是对话框类的数据成员,CPop3SettingsList是列表类,
//iSettings是保存列表值的成员
iSettingList = new (ELeave) CPop3SettingsList(iSettings);
 
SEikControlInfo controlInfo;
controlInfo.iFlags = EEikControlHasEars;
controlInfo.iTrailerTextId = 0;
controlInfo.iControl = iSettingList;
static_cast<CPop3SettingsList*>(controlInfo.iControl)->SetContainerWindowL(*this);
 
return controlInfo;
}
This page was last modified on 15 December 2011, at 13:11.
74 page views in the last 30 days.
×