Hi everyone,
My boss would like to automate the creation of menus, commands and forms dynamically in C#.
We have a custom toolbar with lots of menus and submenus on them. On these, there are commands, tools, etc. My boss would like to read a database table and create a new menu for each row in the table, i.e. buildings, roads, canals, etc. Each one of these menus would have either submenus, forms, commands or tools on it.
So far, I have been able to manually create a generic form and populate it (add checkbox controls) with different types of data.
My problem now is creating the menus themselves dynamically every time the toolbar is displayed. I have experimented with IMenuDef but from what I can see, you must know how many options (submenus) you are going to have and I will not know that at runtime. My boss wants to be able to edit the database table and have the new menus, forms, tools, etc. magically appear on the toolbar.
I've read tons of postings on the forums and I get the suspicion that it is possible to do it, but I cannot figure it out.
Any help is greatly appreciated!
Carlos