WEB开发网
开发学院手机开发Symbian 开发 Symbian 控件架构之对话框 阅读

Symbian 控件架构之对话框

 2010-04-20 15:44:00 来源:WEB开发网   
核心提示:{layout = EDataLayout;label = "提示内容";control = EDWIN{flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;width = 30;lines = 2;maxlength = 159;};};}

{

layout = EDataLayout;

label = "提示内容";

control = EDWIN

{

flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;

width = 30;

lines = 2;

maxlength = 159;

};

};

}

};

}

使用方法:

Code:

TBuf<128> msg;

CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialog(msg,CAknQueryDialog::ENoTone);

TInt ret = dlg->ExecuteLD(R_RESOURCE_DATA_QUERY);

用户输入内容后按“确定”,内容就存储到msg中,函数返回非0;按“取消”,函数返回0。

这里用到的类是CAknQueryDialog的子类CAknTextQueryDialog。

CAknQueryDialog的子类有:

Code:

CAknFloatingPointQueryDialog //This class should be used when user is reguest to enter a flotaing point number

CAknFixedPointQueryDialog //...

CAknDurationQueryDialog //This class should be used when user is reguest to enter duration

CAknIpAddressQueryDialog //This class should be used when user is reguest to enter IP address,@since 2.1

CAknMultiLineDataQueryDialog //Query Dialog with data input on more than one line (2 lines at the moment)

Create using NewL methods and passing parameters as appropriate.

Attention: When deriving from this class, you must call SetDataL during

second phase construction.

CAknMultiLineIpQueryDialog //...

CAknNumberQueryDialog //This class should be used when user is reguest to enter number

CAknTextQueryDialog //This class should be used when user is reguest to enter plain text, secret text,

phonenumber or PIN-code

CAknTimeQueryDialog //This class should be used when user is reguest to enter time or date

使用不同的类,资源文件会有所不同。

另外,在资源中定义EDWIN时,可指定输入发,如:

上一页  2 3 4 5 6 7 8 9 10 11  下一页

Tags:Symbian 控件 架构

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