Hook for sub-contextual menu

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

Hook for sub-contextual menu

Post by wjstarck »

Hi-

I want to add a sub-contextual menu for the time being like the one I proposed here:

viewtopic.php?f=1&t=4678&p=19845&hilit=menu#p19845

Where in ContrChart should the hook go?
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
User avatar
wjstarck
Posts: 949
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck »

OK, nvm looks like it goes here:

Code: Select all

private void gridProg_MouseUp(object sender,MouseEventArgs e) {
			
			if(e.Button==MouseButtons.Right) {
				if(PrefC.GetBool(PrefName.EasyHideHospitals)){
					menuItemPrintDay.Visible=false;
				}
				else{
					menuItemPrintDay.Visible=true;
				}
				Plugins.HookAddCode(this,"ContrChart.gridProg_MouseUp_end");  <-----------
				menuProgRight.Show(gridProg,new Point(e.X,e.Y));
			}
		}
So, can you insert that hook after line 1844 on ContrChart?

Thanks
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
allends
Posts: 245
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook for sub-contextual menu

Post by allends »

Have you tested this to make sure it works?
Allen
Open Dental Software
http://www.opendental.com
User avatar
wjstarck
Posts: 949
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck »

Right.

I was focused on the menus which works fine, but I've still got to pass in the selected procedures. I'll give you an updated hook request once I've got that working.

Thanks.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
User avatar
wjstarck
Posts: 949
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck »

Sorry about that.

The hook should look like this on ContrChart:

Code: Select all

private void gridProg_MouseUp(object sender,MouseEventArgs e) {
			if(e.Button==MouseButtons.Right) {
				if(PrefC.GetBool(PrefName.EasyHideHospitals)){
					menuItemPrintDay.Visible=false;
				}
				else{
					menuItemPrintDay.Visible=true;
				}
          Plugins.HookAddCode(this,"ContrChart.gridProg_MouseUp_end",menuProgRight,gridProg,PatCur); <-------
	       menuProgRight.Show(gridProg,new Point(e.X,e.Y));
          }
   }
If I could get that added to 13.2 and the head that would be great.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
allends
Posts: 245
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook for sub-contextual menu

Post by allends »

This hook has been added.
Allen
Open Dental Software
http://www.opendental.com
User avatar
wjstarck
Posts: 949
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck »

Thanks Allen
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
User avatar
wjstarck
Posts: 949
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck »

Here is the result with the hook:

Image

Thanks guys (and gals)
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA
User avatar
drtech
Posts: 1668
Joined: Wed Jun 20, 2007 8:44 am
Location: Springfield, MO
Contact:

Re: Hook for sub-contextual menu

Post by drtech »

That looks great
David Fuchs
Dentist - Springfield, MO
Smile Dental http://www.887-smile.com
Post Reply