On 24.12.2012 14:58, Giuseppe Aruta wrote: > > Hi Ede, > I probably was not correct to explain myself. > I am not talking about plugins. I observed that layer context submenus (Style > and Datastore) are decorated with icons. I checked which class was involved > and I found that FeatureInstaller.childMenuItem does this job, on Popupmenus: > wehich means that it can be used even for right-click view context menu. > I wonder if it can be used for MainMenu ( 'File,Edit,View...' -this is > right) for submenus (for instance to decorate "View">""Map decoration" > submenus).
as i wrote "FeatureInstaller.childMenuItem works on _all_ menus" .. you give it a menu reference, it give you the item you asked for. but that's not preferred. > I give an other example. I want to add my measuretools to "view" menu under a > submenu (called "Measurements"). I know how to di it but I also want to > decorate that submenu with an icon, like a compass or similar. > Right now I didn't find the way how to use that class. > thanks for the answer first... if there is only your plugin in that submenu.. don't create one, except there will be more in the near foreseeable future. secondly. 1. use FeatureInstaller.addMainMenuPlugin() to add it and create the whole submenu path 2. use menuBarMenu(MenuNames.VIEW) to get the view menu 3. use childMenuItem() on view menu to get the measurements sub menu item 4. decorate it ..ede ------------------------------------------------------------------------------ LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d _______________________________________________ Jump-pilot-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
