×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    39

    dialog with listbox

    The problem seems to be specific to Series 60 only. I can't insert listbox into _multipage_ dialog. With singlepage dialog, constructed from resource without array of PAGEs it does work. Edwins etc work as well. With multipage dialog program crashes with EIKON-FORM 0 (I don't know what this panic means), somewhere after call to CreateCustomControlL() and before the call to PostLayoutDynInitL().
    I guess that creating custom control containing listboxes and other content of the page might help, but i don't know how to do it right.
    This question wasn't given a clear answer before, so please pay attention to it.
    Thanks in advance
    ================================ .RSS file
    RESOURCE DIALOG r_edit_rule_dlg
    {
    title="STRING_dlg_title_edit_email_rules";
    buttons=R_AVKON_SOFTKEYS_CANCEL;
    flags=EEikDialogFlagWait;
    form=r__edit_rule_dlg_page1;
    }

    RESOURCE FORM r__edit_rule_dlg_page1
    {
    items={
    DLG_LINE {
    type=ERulesListBox;
    id = ERuleCondList;
    }
    };
    }
    ================================ .H file
    class CRulesEditDialog: public CAknForm, public MEikListBoxObserver
    {
    public:
    ...
    TBool RunDlgLD();
    SEikControlInfo CreateCustomControlL(TInt aControlType);
    ...
    protected:
    void PostLayoutDynInitL();
    ...
    private:
    ...
    };

    class CRulesListBox : public CAknColumnListBox
    {
    void HandlePointerEventL(const TPointerEvent& /*aPointerEvent*/);
    TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
    };
    ================================ .CPP file
    SEikControlInfo CRulesEditDialog::CreateCustomControlL(TInt aControlType)
    {
    SEikControlInfo controlInfo;
    controlInfo.iControl = NULL;
    controlInfo.iTrailerTextId = 0;
    controlInfo.iFlags = 0;
    switch (aControlType)
    {
    case ERulesListBox:
    controlInfo.iControl = new(ELeave) CRulesListBox;
    break;
    default:
    break;
    }
    return controlInfo;
    }

    TBool CRulesEditDialog::RunDlgLD()
    {
    return CAknDialog::ExecuteLD(R_EDIT_RULE_DLG);
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,144
    In case you can't get it working on the dialog, you could use tabgroups in the view as a workaround. Nearly same look & feel.

    yucca

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    39
    yes, it would be nice, but i should make it as a dialog (porting program from one UI to another). Is where any other way?
    BTW, can Queries be made multipage?

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2004
    Location
    Czech Republic
    Posts
    2,037
    Hi,
    I dont know if you are asking for what I am answering, but if you construct a dialog NOT based on resources, but insted of it you create a container class with whatever controls you want and put it into dialog, its behaviour will be the same as view - so you will be able to scroll it up and down in the case of listbox.

    Bye STeN

  5. #5
    Registered User
    Join Date
    Mar 2003
    Posts
    39
    Thanx STeN, that would be great if you gave me a hont of how to insert a container into dialog

Posting Permissions

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