Updating ContextMenu MenuItems depending on location of right click

  • Thread starter Thread starter illegal.prime
  • Start date Start date
I

illegal.prime

Hey all, I'm getting a weird bug, where I will add sub menu items to a
menu item in my context menu and sometimes the sub menu items appear
and sometimes they don't.

I can see from my logging that the code is successfully using the
MenuItems.Add to add the sub menu - is there anything that might cause
this sort of bug.

I also, initially do a Clear on the submenu since the list of sub menu
items can change from one click to the next.

Thanks for any suggestions,
Novice
 
The answer to this appears to be to remove the submenu's parent, add
the children to the submenu parent, then re-add the submenu parent.
 
Back
Top