How to handle dynamically created Munu Item..............

Login to reply to this topic.
Fri, 2008-05-02 10:17
Joined: 2008-04-11
Forum posts: 18

Hello All,
I am creating one menu item dynamically while other are from resource file.....
blow is my code....the menu item is created fine...but i am facing problem that..

my new mwnu item is in deactivated condition....as for .rss file items we can handle the item on the basis of the enum in HandleCommandL() in view class...but here i am not getting ...

Plz Help...

void CmyAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane)
{
TInt aIndex=0;
CEikMenuPaneItem::SData aMenuItemDataOn;
aMenuItemDataOn.iText=_L("ShuffleOn");
aMenuItemDataOn.iCommandId=20;
aMenuItemDataOn.iCascadeId=0;
aMenuItemDataOn.iFlags=20;

CEikMenuPaneItem::SData aMenuItemDataOff;
aMenuItemDataOff.iText=_L("ShuffleOff");
aMenuItemDataOff.iCascadeId=0;
aMenuItemDataOff.iCommandId=20;
if(appView->imp3Utility->iShuffleUi)
{
aMenuPane->InsertMenuItemAtL(aMenuItemDataOff,aIndex);
}
else
{
aMenuPane->InsertMenuItemAtL(aMenuItemDataOn,aIndex);
}
}

}


correct me if m worng


Thu, 2008-05-08 10:23
Joined: 2006-11-23
Forum posts: 15
Re: How to handle dynamically created Munu Item..............

Hi pawan,

See the reply to your post on UIQ forum... there i have attached a sample application which demonstrates the dynamic creation of menu items....

Here is link...
http://developer.uiq.com/forum/thread.jspa?threadID=2935&tstart=15

Br,
Pankaj


Pankaj Dubey

  • Login to reply to this topic.