Form and Text Editor in Dialog
I'm trying to place a form and text editor in a dialog screen, however I want the form to appear at the top of the dialog followed by the text editor underneath.
Unfortunetly when I run the application, the text editor in always above the form. How do I change this?
My rss code is:
RESOURCE DIALOG r_imaildialog_dialog
flags=EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar | EEikDialogFlagFillAppClientRect |
EEikDialogFlagCbaButtons | EEikDialogFlagModeless;
form = r_imaildialog_header_form;
type = EEikCtEdwin;
id = myDialogDlg1Label;
control = EDWIN
flags = EAknEditorFlagDefault;
width = 10;
lines = 5;
maxlength = 10;
instead of creating this combination in rss file try adding text editor or form dlg line in the code.
see FORM example of S60 section 3.11 Adding fields
I tried "CreateLineByTypeL()"...but
Thanks for your reply!
I have looked at the AddItemL() code in the Form example of SDK as advised.
I tried using the following code in the PreLayoutDynInitL() function of my dialog, however it keeps on crashing on startup.
Is this because the Dialog is not fully created yet at this point?
Where is the best place to put this code?
// Add Edwin control
TBuf<10> caption( "Editor Text" );
TInt myId = EAknExFormDlgCtrlIdEdwin02 + 1;
CCoeControl* myEdControl = CreateLineByTypeL(caption, ActivePageId(), myId , EEikCtEdwin, NULL) ;
CEikEdwin* myEdwin = STATIC_CAST(CEikEdwin*, myEdControl) ;
myEdwin->ConstructL(EEikEdwinNoHorizScrolling | EEikEdwinResizable, 10, 64, 10);
Yes your code will not work b'cos you can't add a new item before dialog is completely drawn.
I think in your case, you have to manually go and select the add item option and then add a new item as illustrated in the example
i am not sure if this will help you in what you are trying to do.
Ok...here's the latest!!!
I've managed to use a timer to call the AddItemL() as soon as the dialog is drawn and it works Ok for adding an editor dynamically to the dialog.
However, how do you add a FORM to a dialog dynamically?
i.e. like editor has control name EDWIN, what is the control name for a FORM?
did you ever resolve your problem?
I think i want to implement something similar.
a form with 3 items and a 'full width' texteditor at the bottom.