How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

Post by dcrider » Wed Sep 02, 2020 11:26 am

Usually buttons have a PerformClick() method, however, I've noticed that ODToolBarButtons do not have such a method. I have a popup that makes our teammates make a choice. Choice A should programmatically click the Payment button and Choice B should open a custom form we created, but that has a button on the toolbar similar to the Payment button.

I would like to handle the clicking of those buttons programmatically and was wondering how that could be accomplished?

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

Post by allends » Wed Sep 02, 2020 11:31 am

The easiest method is going to be to add a hook to this method "toolBarButPay_Click" in ControlAccount.
That way you can pose a question to perform your logic when the customer clicks the Payment button.
Allen
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

Post by dcrider » Wed Sep 02, 2020 11:36 am

Yes, I've done that. Now I would like to perform a click on one of the two other buttons depending on their selection.

Basically I want my code to DO the clicking, not just act on a button being clicked.

allends
Posts: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

Post by allends » Thu Sep 03, 2020 11:18 am

What is initiating this code that you want ran?
I may be misunderstanding, but you should be able to place your question into the hook in the payment click.
Then you could open your custom form if they chose, or just let the normal payment window open.
Allen
Open Dental Software
http://www.opendental.com

User avatar
dcrider
Posts: 67
Joined: Sun Sep 29, 2019 11:03 am
Contact:

Re: How to click a OpenDental.UI.ODToolBar.ODToolBarButton?

Post by dcrider » Thu Sep 10, 2020 12:27 pm

I may not have been clear in my original post. However, business requirements have changed negating my need for this solution.

Post Reply