Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
380
Creating a dynamic toolbar with a static toolbar in UltraToolBarsManager
posted

I have a situation. In a separate menu thats in a tree, I can control the elements of a dynamic toolbar. Basically for each item chosen in the tree, the dynamic toolbar changes its tools to match the options required. I have a static toolbar that is apart of that same toolbarsManager. Basically the layout is as follow. UltraToolBarsManager consisting of two toolbars........the static one on top and dynamic one below. Here is the issue...I have a problem with the speed of the navigation because I need to clear the tools in the ultraToolBarsManager and clear the tools in the dynamic toolbar every time another option in the tree is chosen. Every time I clear the ultraToolBarsManager, I have to re-add the tools needed for the static toolbar all over again along with the "new" tools for the dynamic toolbar.  The way the toolbarmanager works, when i add for eg a PopupMenuTool, I need to create a string key, give that PopupMenuTool instance that string key, add the instance to the ultraToolBarsManager.Tools and add the string key to the ultraToolBarsManager.Toolbars["DynamicToolbar"].Tools . One option is to keep an arrayList of all the keys i add to the ultraToolBarsManager and then iterate through it and delete the keys which match when its time for the toolbar items to change. Another process which could slow down the navigation. Any suggestions?