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
205
Question of how to programatically fire the click of a tool
posted

I need to programmtically fire the click of an existing tool so I can execute my existing tool click event code.

I see that the ButtonToolUIElement has a FireClickEvent() method but  how do I access to this object using UltraToolManager.Tools collection?  When access my tool in the tool collection and check the UIElement property it is null.

Could any one please help?

TIA,

Mark Lindell

 

 

 

Parents
No Data
Reply
  • 44743
    posted

    I would not recommend using a the FireClickEvent on the ButtonToolUIElement. You can only get to the ui element if an instance of the button tool is visible, and that may not be guaranteed to be true.

    I think the best thing to do here would be to separate out the click event handler code for this one tool into its own method which is called from the normal ToolClick event handler. Then you can call that method from anywhere else in your code and simulate the button click's action without having to interact with the toolbars manager.

Children
No Data