Discussion Board
disallowing users from editing/adding labels and deleting fields in my form?
2003-07-12, 06:29
#1
Regular Contributor
Hi
I wish for users to be able to edit my form fields, but to disable them from editing/adding labels and deleting fields in my form.
This features are provided by the form options menu once in edit mode.
i tried taking away the EEikDialogFlagCbaButtons flag from the form resource, hopefully taking away the menu, well it didn't work.
What should i do?
thanks
-advo-
Nokia Developer Expert
Hi
I think that the easiest way would be to disable the menus for the options you don't want users to use. To do that just implements DynInitMenuPaneL()-function for your form and in there the resource menupane is R_AVKON_FORM_MENUPANE (see AVKON.RSG), and the menu ID's can be find from AVKON.HRH. Example of hoe to use the function goes like this:
//start code
void CMyForm: ynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
{
CAknForm: ynInitMenuPaneL(aResourceId,aMenuPane);
if (aResourceId == R_AVKON_FORM_MENUPANE) //see AVKON.RSG !
{
aMenuPane->SetItemDimmed(EAknFormCmdAdd,ETrue); //see AVKON.HRH !
aMenuPane->SetItemDimmed(EAknFormCmdLabel,ETrue);
aMenuPane->SetItemDimmed(EAknFormCmdDelete,ETrue);
}
}
//End code
yucca
Regular Contributor
It works! thanks!~
Also refered to the AKNEXMENU example.
-advo-
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules