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
900
how to find all instances of a ButtonTool
posted

Hi,

I have a ButtonTool defined in my ToolbarsManager.Tools collection.  This button can appear in multiple places on my Ribbon Tabs, or in popup menus - the user is allowed to set where the tool will be displayed.

I need to be able to find all the Instances of this tool so that I can replace it with some other tools.  It is really just a placeholder. 

Is there a built-in way of finding all instances of a tool?  Or do i just need to cycle through the ribbons and stuff myself?

Thanks,

~Karen

  • 71886
    Offline posted

    Hello Karen,

    I think that the following code sample might be helpful to you:

    ultraToolbarsManager1.Ribbon.Tabs[0].Groups[0].Tools[0].SharedProps.ToolInstances;

    The above code will return a collection of the tool's instances.

    Please feel free to let me know if I misunderstood you or if you need any additional assistance.