×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    25

    Form and Text Editor in Dialog

    Hi,

    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;
    buttons=R_AVKON_SOFTKEYS_OPTIONS_BACK;
    form = r_imaildialog_header_form;
    items=
    {
    DLG_LINE
    {
    type = EEikCtEdwin;
    id = myDialogDlg1Label;
    itemflags=EEikDlgItemTakesEnterKey| EEikDlgItemOfferAllHotKeys;
    control = EDWIN
    {
    flags = EAknEditorFlagDefault;
    width = 10;
    lines = 5;
    maxlength = 10;
    };
    }
    };
    }

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Gurgaon, India
    Posts
    101
    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

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    25

    I tried "CreateLineByTypeL()"...but

    Hi,

    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);
    myEdwin->CreateTextViewL();
    Line(iNewItemId /*myId*/)->ActivateL();

    SetEditableL(IsEditable()) ;
    DrawNow() ;

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Gurgaon, India
    Posts
    101
    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.

  5. #5
    Registered User
    Join Date
    May 2003
    Posts
    25
    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?

  6. #6
    Regular Contributor
    Join Date
    Aug 2004
    Location
    East Coast, USA
    Posts
    192
    hi,
    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.



    regards,
    Sebastian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •