Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

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

From 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 10:11.
283 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.

×