I now realize that I cannot even set images in design mode for submenus
I'm trying to use the vistamenu1.setimages to assign images to dynamically created context menuitems. It works great for first level items, but I cannot get it to work for sub items. Please help.
I now realize that I cannot even set images in design mode for submenus
It works for me, can you send me a simple example that's not working?
Send it to wyatt@wyday.com .
Thanks for the reply. I sent you a small example. I appreciate any help.
Thanks for spotting this - I'll try to work on a fix this weekend.
THANK YOU!!! I was so bummed when it didn't work cuz I really need it.
Any luck???
Yes. This is a definitely a bug on our part. We'll have a new release out a little later this week.
I've uploaded the latest version of VistaMenu. It fixes a few other bugs. But the bug you saw was due to a bug in Microsoft's implementation of the ContextMenu control.
The way to get around the bug is to set the Form's "ContextMenu" property to the context menu you want to use:
this.ContextMenu = contextMenu1;
Instead of dynamically showing the context menu using contextMenu1.Show()
That should work for you.
Thank you! That works. All I had to do was set the form's context menu and I'm still able to show it through contextmenu1.show() which is great because that is unavoidable in my case.
im using
private void menuDropDownButton_Click(object sender, EventArgs e) { contextMenu1.Show(statusStrip1, new Point(506, 25)); }
to show menu, how in my case fix this bug with icons?
What's the question? What problem are you having? A lot more information is needed, starting with what you're trying to do, what you expect to happen, and what is actually happening.
Icons doesn't work for sub items. this.ContextMenu = contextMenu1; doesent help
This code shows how I open the menu:
private void menuDropDownButton_Click(object sender, EventArgs e){contextMenu1.Show(statusStrip1, new Point(506, 25));}
And also shortcuts for menu items doesn't work.
I've got an image on the parent of a sub-menu that vanishes when the sub-menu pops up. The problem relates to the dynamically deleted/created child MenuItems in the parent's popup event. Changed to purely static content, the parent image remains. Essentially...
while (mnu.MenuItems.Count > 4) {....mnu.MenuItems.RemoveAt(2);}
foreach (string str in whatever) {...MenuItem item = new MenuItem(str);
....mnu.MenuItems.Add(mnu.MenuItems.Count - 2, item);
Any ideas?