×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    8

    CAknForm, no editing and deleting of label!

    Hi, I have build a formular like the form example of the sdk. It works wonderful, but there is funktion which I dont wont in my application.

    If I edit a formular line, I have also the option menu with the 4 funktions:
    - Add Field
    - Save
    - edit label
    - delete field

    I dont want offer this funktions to the user! How can I deactivate this option menu???
    Here is my Resource File:



    RESOURCE DIALOG r_netcam2_formular
    {
    flags = EEikDialogFlagNoDrag | EEikDialogFlagFillAppClientRect |
    EEikDialogFlagNoTitleBar | EEikDialogFlagNoBorder |
    EEikDialogFlagCbaButtons;
    buttons = R_AVKON_SOFTKEYS_OPTIONS_BACK;
    form = r_aknexform_all_editor_field_form2;
    }


    RESOURCE FORM r_aknexform_all_editor_field_form2
    {
    //flags = EEikFormUseDoubleSpacedFormat;
    items =
    {

    DLG_LINE
    {
    type = EEikCtEdwin;
    prompt = Host;
    id = EAknNetCamHostEd;
    itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
    control = EDWIN
    {
    flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable;
    width = AKNEXFORM_EDWIN_WIDTH;
    lines = AKNEXFORM_EDWIN_LINES;
    maxlength = 64;
    // added to limit expanding in forms.
    // If you want full screen use 5 here
    max_view_height_in_lines = 5;
    // if you have the line above, you must have this.
    // It's calculable from LAF
    base_line_delta = 21;
    };
    },
    };

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Gyor
    Posts
    236
    Create your own Form:
    // class CMyForm : public CAknForm
    // and clean Form's menu there:

    void CMyForm::DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
    {
    CAknForm::DynInitMenuPaneL (aResourceId, aMenuPane);
    if (aResourceId == R_AVKON_FORM_MENUPANE)
    {
    // Default behaviour handled in AknForm is suitable for this form
    // If not, comment out and modify the following lines
    // TBool editOptionDimmed = IsEditable();
    // aMenuPane->SetItemDimmed(EAknFormCmdEdit, editOptionDimmed);

    // We do not want to allow the user to modify our Form therefore
    // Disable the Label, Add, and Delete Filed
    aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
    aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);

    }

    }

    Happy Cleaning,
    CLR

  3. #3
    Registered User
    Join Date
    Jul 2004
    Posts
    8
    Thanks for this Tipp!
    It works greate!

Posting Permissions

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