Page 1 of 1

PatientSelected Event Not Firing

Posted: Fri Aug 20, 2010 9:46 am
by FernandoJB
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.

Re: PatientSelected Event Not Firing

Posted: Sat Aug 21, 2010 12:39 pm
by jordansparks
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;

Re: PatientSelected Event Not Firing

Posted: Mon Sep 13, 2010 10:16 am
by FernandoJB
Can you put a Hook at the end of RefreshModuleScreen for ContrFamily ?

Re: PatientSelected Event Not Firing

Posted: Thu Sep 16, 2010 6:28 am
by michael
Hook was added yesterday. It will be available for use with version 7.2.41.

You are welcome.