Page 1 of 1

Hook request- FormProcEdit.FillControlsOnStartup()

Posted: Tue Nov 10, 2020 6:53 pm
by wjstarck
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.

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Posted: Wed Nov 11, 2020 11:06 am
by joes
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);

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Posted: Wed Nov 11, 2020 12:07 pm
by wjstarck
Joe-

Not a problem. That will be fine. Thank you

Re: Hook request- FormProcEdit.FillControlsOnStartup()

Posted: Thu Nov 12, 2020 2:41 pm
by joes
This hook will be available in version 20.4.20 upon its release.