Downloads  |  Buy

Vistamenu - Adding images through code

Re: Vistamenu - Adding images through code

Postby PwnYOU » July 31st, 2015, 6:14 am

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?
PwnYOU
 

Re: Vistamenu - Adding images through code

Postby Wyatt » July 31st, 2015, 12:07 pm

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.
User avatar
Wyatt
Site Admin
 
Posts: 6053
Joined: July 11th, 2007, 10:30 pm
Location: New Hampshire

Re: Vistamenu - Adding images through code

Postby PwnYOU » August 1st, 2015, 8:28 am

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.
PwnYOU
 

Re: Vistamenu - Adding images through code

Postby Zer0th » July 30th, 2016, 11:09 am

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?
Zer0th
 

Previous

Return to Open Source Support