AHK1221 Posted May 1, 2017 Share Posted May 1, 2017 Is it possible? Because whenever I add a menu, I get a "Collection was modified; enumeration operation may not execute" exception. This is kind of crucial for the feature I'm trying to make, any help would be much appreciated. Link to comment Share on other sites More sharing options...
MoMadenU Posted May 1, 2017 Share Posted May 1, 2017 Do you have the latest version of NativeUI? 'cause the code below placed in KeyDown worked fine if (e.KeyCode == Keys.F6 && _mainMenu.Visible) { var submenu = _menuPool.AddSubMenu(_mainMenu, "Runtime Menu"); submenu.AddItem(new UIMenuItem("Runtime 1", "Added During Runtime")); submenu.AddItem(new UIMenuItem("Runtime 2", "Added During Runtime")); submenu.AddItem(new UIMenuItem("Runtime 3", "Added During Runtime")); } Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now