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

Symbian 对话框用法

 2010-03-05 06:11:00 来源:WEB开发网   
核心提示:buttons = R_AVKON_SOFTKEYS_OK_CANCEL;items ={DLG_LINE{type = EAknCtQuery;id = EGeneralQuery;control = AVKON_DATA_QUERY{layout = EDurationLayout;label = qtn_akne

buttons = R_AVKON_SOFTKEYS_OK_CANCEL;

items =

{

DLG_LINE

{

type = EAknCtQuery;

id = EGeneralQuery;

control = AVKON_DATA_QUERY

{

layout = EDurationLayout;

label = qtn_aknexquery_dura_label_text;

control = DURATION_EDITOR

{

minDuration = DURATION

{

};

maxDuration = DURATION

{

seconds = AKNEXQUERY_DURATION_EDITOR_MAX_SECOND;

};

flags = AKNEXQUERY_DURATION_EDITOR_FLAGS;

};

};

}

};

}

其中:

STRUCT DURATION_EDITOR

{

STRUCT minDuration; // DURATION

STRUCT maxDuration; // DURATION

BYTE flags=0; // permitted flags:

// EEikTimeWithout[Seconds][Hours]Field

}

STRUCT DURATION

{

LONG seconds=0; // must be greater than or equal to zero

}

持续时间请求对话框对应的类是:CAknDurationQueryDialog。下面代码示例之:

TTimeIntervalSeconds duration;

// create dialog instance; duration is a reference to

// TTimeIntervalSeconds object that is used for the editor

CAknDurationQueryDialog* dlg = CAknDurationQueryDialog::NewL(duration, CAknQueryDialog::ENoTone );

// launch the dialog with resource

if (dlg->ExecuteLD(R_AKNEXQUERY_DURATION_LAYOUT))

{

// ok pressed, duration is a TtimeIntervalSeconds object

// containing the entered duration in the editor.

}

浮点数请求对话框

RESOURCE DIALOG r_demo_floating_query

{

flags = EGeneralQueryFlags;

buttons = R_AVKON_SOFTKEYS_OK_CANCEL;

items =

{

DLG_LINE

{

type = EAknCtQuery;

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

Tags:Symbian 对话框 用法

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