How can I get value on a control in a multiline data Query dialog
| Tue, 2005-05-31 13:13 | |
|
Hi
How can I get value on a control in a multiline data Query dialog I mean to say .. i want to read the data entered by the user in a Multiline Data Query Dialog .. any code samples will be of great help please also tell me how to make pointer to the control Regards Veeraj |
|






Forum posts: 83
CEikEdwin *pCtrlUrlEditor=static_cast <CEikEdwin*> (ControlOrNull(ESettingsFormUploadUrl));
ESettingsFormUploadUrl - is ID of control
Forum posts: 39
CEikEdwin *pCtrlUrlEditor=static_cast <CEikEdwin*> (ControlOrNull(ESettingsFormUploadUrl));
It doesnot work for me
what does this mean ESettingsFormUploadUrl
gives error ' ControlOrNull' is undeclared identifier
I am using following code for making dialog ...
................................................................
appui .cpp
................................................................
TBuf<20> aQueryTxt;
aQueryTxt=_L("Test Query");
CAknMultiLineDataQueryDialog *dlg = CAknMultiLineDataQueryDialog::NewL(aQueryTxt,aQueryTxt,CAknQueryDialog::ENoTone);
dlg->ExecuteLD(R_USERNAME_PASSWD_DIALOG);
...
.... here I want to read the data enterd by user
...........................................................................
from .rss file
..........................................................................
RESOURCE DIALOG r_username_passwd_dialog
{
flags = EGeneralQueryFlags;
buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
items =
{
DLG_LINE
{
type = EAknCtMultilineQuery;
id = EMultilineFirstLine;
control = AVKON_DATA_QUERY
{
layout = EMultiDataFirstEdwin;
label = "User Name";
control = EDWIN
{
width = 5;
lines = 5;
maxlength = 128;
};
};
},
DLG_LINE
{
type = EAknCtMultilineQuery;
id = EMultilineSecondLine;
control = AVKON_DATA_QUERY
{
layout = EMultiDataSecondEdwin;
label = "Password" ;
control = EDWIN
{
width = 5;
lines =5;
maxlength = 128;
};
};
}
};
}
.........................................................................
I want to read the data in the following controll fields ..... EDWIN both
1) EMultilineFirstLine
2) EMultilineSecondLine
please suggest the way ....
Any code sample will be of great help
Regards
Veeraj thaploo l
Forum posts: 83
Like EMultilineFirstLine or EMultilineSecondLine
I write you what ESettingsFormUploadUrl is my control ID from my dialog.
Then you must specificate rigth tipe of you control in my exemple it CEikEdwin for you it CEikEdwin too.
So you must write:
CEikEdwin *pCtrlUrlEditor=static_cast <CEikEdwin*> (ControlOrNull(EMultilineFirstLine));
Forum posts: 122
U shud use aQueryTxt and aQueryPwd here.......not just aQueryTxt..........afterall u have 2 fields not 1.
then
if (ret == EEikBidOk)
{
   //aQueryTxt and aQueryPwd will now hold the values you need
}
Forum posts: 39
I am using this code
CEikEdwin *edwin = STATIC_CAST(CEikEdwin*,dlg->ControlOrNull(EMultilineFirstLine));
edwin->GetText(readtext);
This is not giving any syntex error but linking error ie unresolved " public: class CCoeControl * __thiscall CEikDialog::ControlOrNull(int)const "
if I use directly what u suggested ie this code
CEikEdwin *pCtrlUrlEditor=static_cast <CEikEdwin*> (ControlOrNull(ESettingsFormUploadUrl));
it gives some syntex error like undefined ControlOrNull
i am not getting unpatient now ... not able to do this simple thing
Please guys do help
Thanks & Regards
veeraj thaploo
Forum posts: 83
CEikEdwin *pCtrlUrlEditor=static_cast <CEikEdwin*> (ControlOrNull(ESettingsFormUploadUrl));
inside my class what was delived from dialog.
You use this function outside. It is about compil error.
About linker:
You must add library (what contain implemetion of CEikDialog::ControlOrNull(int)const function) in your project. It is eikdlg.lib library
Forum posts: 122
Also, you've got a mistake in your resource.
label = "Password" ;
control = EDWIN
Forum posts: 39
did it .... both ways ...
once again thanks a lot .... it is a great forum ....
Regards
Veeraj Thaploo