Hi, i found a dificulty making a plugin, when the user Clicks "Select Patient" button, it wont Fire the PatientSelected event, it only fires when clicking patient name on the Family Grid.
I added a button to the ContrFamily Toolbar, and need to know when the patient is selected or changed to Activate / Deactivate the Button based on Selected Patient Information.
is this by design? its a bug? is there any other way to intercept the Selection of a Patient ?
Thanks.
Fernando.
PatientSelected Event Not Firing
- FernandoJB
- Posts: 6
- Joined: Fri Aug 20, 2010 9:39 am
- Location: Framingham, MA
- Contact:
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: PatientSelected Event Not Firing
The patient selected event passes information up from the Family module to the main FormOpenDental. However, the top toolbar is part of FormOpenDental, not part of the Family module. You will see that the top toolbar is constant across all modules because it's not part of the modules. But that even is not meant to trigger a refresh inside of a module. It's only purpose it to tell the main form that a patient has changed. This won't necessarily cause any visible effect. What you really want to do is respond to the ModuleSelected method being called. For example, you could put your code at the end of RefreshModuleScreen after all the data objects are guaranteed to have been refreshed. Maybe like this:
ToolBarMain.Buttons["MyButtonName"].Enabled=false;
ToolBarMain.Buttons["MyButtonName"].Enabled=false;
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
- FernandoJB
- Posts: 6
- Joined: Fri Aug 20, 2010 9:39 am
- Location: Framingham, MA
- Contact:
Re: PatientSelected Event Not Firing
Can you put a Hook at the end of RefreshModuleScreen for ContrFamily ?
Re: PatientSelected Event Not Firing
Hook was added yesterday. It will be available for use with version 7.2.41.
You are welcome.
You are welcome.