Generating menu items dynamically from Collection?
-
I implemented collection of Queue type that I use to save last 10 opened/saved files... so I want to use this list to dynamically update my menu sub items under RecentlyOpenedFiles, any idea how?
-
I implemented collection of Queue type that I use to save last 10 opened/saved files... so I want to use this list to dynamically update my menu sub items under RecentlyOpenedFiles, any idea how?
assign event with any change in your Queue and update ur menu sub items then
-
assign event with any change in your Queue and update ur menu sub items then
OK but first I only know how to add things to menu in designer though I guess it's not that hard...) each should be just call to Open method with parameter file path from queue subitem represent, but how to do second part?
-
OK but first I only know how to add things to menu in designer though I guess it's not that hard...) each should be just call to Open method with parameter file path from queue subitem represent, but how to do second part?
I would be OK with any solution that solve this problem... doesn't need to be queue... anything that generate this menu is fine...
-
I implemented collection of Queue type that I use to save last 10 opened/saved files... so I want to use this list to dynamically update my menu sub items under RecentlyOpenedFiles, any idea how?
The Menu is a class, it has a collection of items, which are also a class ( which can contain a new list of menu items ). So, you just need to insert your items into the menu, by creating them one at a time.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
I implemented collection of Queue type that I use to save last 10 opened/saved files... so I want to use this list to dynamically update my menu sub items under RecentlyOpenedFiles, any idea how?
Have a look at the menu-related code generated by Visual Designer, it shows you how uou can do exactly the same in your code... :)
Luc Pattyn