×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Dec 2008
    Posts
    217

    how to handle opeion menu in form ?

    hi all

    when click option , just close form. not pop up menu .

    what's wrong? thanks.

    code is as follows:

    .rss
    RESOURCE DIALOG r_myform_dialog
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
    EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder |
    EEikDialogFlagCbaButtons;
    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    ...

    .cpp
    TBool CMDataForm::QuerySaveChangesL()
    {
    TBool isAnsYes( CAknForm::QuerySaveChangesL() );

    if ( isAnsYes )
    {
    SaveDataL();
    }
    else
    {
    // Case that answer "No" to query.
    DoNotSaveFormDataL();
    }

    return isAnsYes;
    }
    void CMDataForm::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
    {
    SetEditableL(ETrue);
    CAknForm::DynInitMenuPaneL(aResourceId,aMenuPane);
    if(aResourceId == R_AVKON_FORM_MENUPANE)
    {
    aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdEdit, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdSave, EFalse);
    }
    }

    void CMDataForm::ProcessCommandL( TInt aCommandId )
    {
    CAknForm::ProcessCommandL(aCommandId );

    switch ( aCommandId )
    {
    case EAknFormCmdSave: // Save and exit
    SaveDataL();
    CAknForm::TryExitL(aCommandId);
    break;
    default:
    break;
    }

    }

  2. #2
    Regular Contributor
    Join Date
    Apr 2006
    Location
    India
    Posts
    383

    Re: how to handle opeion menu in form ?

    Hi

    Please go through http://www.forum.nokia.com/document/...Form_API4.html

    Also see wiki n SDK for form examples.

    Hope it helps
    Regards,
    Shilpa Kulkarni

Similar Threads

  1. Replies: 3
    Last Post: 2007-02-16, 07:47
  2. how to add edit menu on the form
    By shafali gupta in forum Symbian User Interface
    Replies: 4
    Last Post: 2005-05-30, 02:39
  3. option menu on the form
    By shafali gupta in forum Symbian User Interface
    Replies: 1
    Last Post: 2005-01-06, 03:27
  4. How to get User defined menu items in a form?
    By sridhar_ratna in forum Symbian
    Replies: 1
    Last Post: 2003-03-16, 18:44
  5. How to get User defined menu items in a form?
    By sridhar_ratna in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-03-14, 12:55

Posting Permissions

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