Hook request- FormProcEdit.FillControlsOnStartup()

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Hook request- FormProcEdit.FillControlsOnStartup()

Post by wjstarck » Tue Nov 10, 2020 6:53 pm

Could I have the following hook at the bottom of FormProcEdit.FillControlsOnStartup() ?

Code: Select all

				else {
					labelScheduleBy.Visible=true;
					comboDPC.SelectedIndex=0;
					comboDPCpost.SelectedIndex=0;
					textDateStop.Text="";
				}
			}
        -----------> Plugins.HookAddCode(this, "FormProcEdit.FillControlsOnStartup_end", comboProv.GetSelectedProvNum(), _procCur, _procOld, textNotes);
		}

		private void FormProcEdit_Shown(object sender,EventArgs e) {
Should be at line 768 on OD 20.3.43

Thanks.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Post by joes » Wed Nov 11, 2020 11:06 am

After seeing your hook request here, it occurred to me that the code I suggested in the other thread, viewtopic.php?f=3&t=7396 was not the best solution. You have access to the instance of FormProcEdit and can get and set all controls through the use of FormProcEdit.Controls.Find(). So, passing comboProv.GetSelectedProvNum() and textNotes to the hook method shouldn't be necessary. I think that the following hook would give you access to everything that you need, but I'll wait to hear back from you before implementing anything.

Code: Select all

Plugins.HookAddCode(this,"FormProcEdit.FillControlsOnStartup_end",_procCur,_procOld);
Joe Sullivan
Open Dental Software
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Post by wjstarck » Wed Nov 11, 2020 12:07 pm

Joe-

Not a problem. That will be fine. Thank you
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

joes
Posts: 239
Joined: Tue Aug 13, 2019 12:41 pm

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Post by joes » Thu Nov 12, 2020 2:41 pm

This hook will be available in version 20.4.20 upon its release.
Joe Sullivan
Open Dental Software
http://www.opendental.com

Post Reply