Hi!
I'm creating a IGContextMenu with several IGMenuItem items. They all have icons and they ar shown in the context menu. But If I add IGMenuItem items to another IGMenuItem item (sub menu/folder in the context menu), then icons are not shown in the added childeren items.
I want menu item groups (IGMenuItem items with IGMenuItem items as childeren) to display icons as well. How do I do that?
IGMenuItem exposes an Image property, so you just assign a value to that property. Images are displayed regardless of the item's placement within the hierarchy.
I have done that. But When I add a menu item to another menu item, Images are not shown.
You are absolutly right. There was another bug that prevented this (my fault). Thanks...
I verified that images appear for child menu items with the following code:
IGContextMenu contextMenu = new IGContextMenu();IGMenuItem parent = new IGMenuItem("Parent");IGMenuItem child1 = new IGMenuItem("Child1");IGMenuItem child2 = new IGMenuItem("Child2");IGMenuItem child3 = new IGMenuItem("Child3");
parent.Image = imageList.Images[0];child1.Image = imageList.Images[1];child2.Image = imageList.Images[2];
contextMenu.MenuItems.Add( parent );parent.MenuItems.Add( child1 );parent.MenuItems.Add( child2 );parent.MenuItems.Add( child3 );