如何定义dialog的资源

fire_boy 2008-07-22 12:12:10
在rss文件中:
RESOURCE DIALOG r_dialog_my
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
}
1.如何添加选项菜单?
2.如何添加导航卡片(TAB_GROUP or NAVI_DECORATOR)?
...全文
120 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
stonesl 2008-07-22
  • 打赏
  • 举报
回复
到这来下吧,传到这了
http://download.csdn.net/source/549146
fire_boy 2008-07-22
  • 打赏
  • 举报
回复
菜单成功了,但导航卡片还末成功.

《series 60应用程序开发》发到wusj@willas-array.com,十分感谢!
anel 2008-07-22
  • 打赏
  • 举报
回复
try:
CAknDialog::ConstructL()
stonesl 2008-07-22
  • 打赏
  • 举报
回复
1、
Defining a Menu for Your Dialog
When the player name dialog is displayed in the SimpleDlg application, the soft keys are labeled Ok and Cancel, as shown in Figure 6-2. A more complex dialog may need to have a menu associated with it, the menu being activated by an Options soft key.

To do this, define the menu in a MENU_BAR resource, ensuring that it has an Exit option. Set the DIALOG resource buttons to an appropriate value梩his means one containing an Options soft key, such as R_AVKON_SOFTKEYS_OPTIONS_BACK. The resource is then passed through to the dialog in its ConstructL() method. To dynamically configure the menu you have to override DynInitMenuPaneL().

Note that if it is necessary to override the OkToExitL() function, then the overridden version of this function is responsible for displaying the menu. To handle custom menu commands, implement the ProcessCommandL() function. Further details on menus are available in Chapter 5.

2、Multipage Dialogs

RESOURCE DIALOG r_myapp_player_dialog

{

flags = EEikDialogFlagNoDrag | EEikDialogFlagCbaButtons |

EEikDialogFlagFillAppClientRect | EEikDialogFlagWait;

buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;

pages = my_pages;

}
RESOURCE ARRAY my_pages

{

items =

{

PAGE

{

text = "Name";

lines = my_name_lines;

},

PAGE

{

text = "Age";

lines = my_age_lines;

}

};

}

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;

};

}

};

}

...


详见《series 60应用程序开发》一书,第6.2节,讲的比较详细,也有完整的例子,需要电子版的可发消息给我。

3,119

社区成员

发帖
与我相关
我的任务
社区描述
塞班系统(Symbian系统)是塞班公司为手机而设计的操作系统,它的前身是英国宝意昂公司的 EP ( Electronic Piece of cheese)操作系统。
社区管理员
  • Symbian社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧