WEB开发网
开发学院手机开发Symbian 开发 Symbian 对话框用法 阅读

Symbian 对话框用法

 2010-03-05 06:11:00 来源:WEB开发网   
核心提示:control = AVKON_DATA_QUERY{layout = ETimeLayout;label = qtn_aknexquery_time_label_text;control = TIME_EDITOR{minTime = TIME{second =AKNEXQUERY_TIME_EDITOR_MIN_S

control = AVKON_DATA_QUERY

{

layout = ETimeLayout;

label = qtn_aknexquery_time_label_text;

control = TIME_EDITOR

{

minTime = TIME

{

second =AKNEXQUERY_TIME_EDITOR_MIN_SECOND;

minute =AKNEXQUERY_TIME_EDITOR_MIN_MINUTE;

hour =AKNEXQUERY_TIME_EDITOR_MIN_HOUR;

};

maxTime = TIME

{

second =AKNEXQUERY_TIME_EDITOR_MAX_SECOND;

minute =AKNEXQUERY_TIME_EDITOR_MAX_MINUTE;

hour =AKNEXQUERY_TIME_EDITOR_MAX_HOUR;

};

flags = EEikTimeWithoutSecondsField;//这个设置了Control 是没有秒显示的时间

};

};

}

};

}

时间/日期请求对话框对应的类是:CAknTimeQueryDialog。下面代码示例之:

TTime time(_L("20000111:200600.000000"));

//TTime 类型 请自己参看帮助 S60 Developer Tools下 还有设置模拟器的文字显示,要能显示中文 我会在以后再和大家讲

// The prompt text for the query

TBuf<128> prompt(_L("Enter Time:"));

// create dialog instance; time is a reference to TTime object that is // used for the editor

CAknTimeQueryDialog* dlg =CAknTimeQueryDialog::NewL( time, CAknQueryDialog::ENoTone);

CleanupStack::PushL(dlg);

// set prompt text for query. This will override text given in resource

dlg->SetPromptL(prompt);

CleanupStack::Pop(); //dlg

// launch the dialog with resource

if (dlg->ExecuteLD(R_AKNEXQUERY_TIME_QUERY))

{

// ok pressed, time is a Ttime object containing the entered time // in the editor.

}

持续时间请求对话框

持续时间请求对话框跟时间/日期请求对话框类似,区别是它的layout是EDurationLayout,control是DURATION_EDITOR

RESOURCE DIALOG r_aknexquery_duration_layout

{

flags = EGeneralQueryFlags;

上一页  7 8 9 10 11 12 13 14  下一页

Tags:Symbian 对话框 用法

编辑录入:coldstar [复制链接] [打 印]
赞助商链接