Hook for sub-contextual menu

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

Hook for sub-contextual menu

Post by wjstarck » Mon Sep 23, 2013 10:36 pm

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: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck » Tue Sep 24, 2013 11:53 am

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: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook for sub-contextual menu

Post by allends » Tue Sep 24, 2013 2:49 pm

Have you tested this to make sure it works?
Allen
Open Dental Software
http://www.opendental.com

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

Re: Hook for sub-contextual menu

Post by wjstarck » Tue Sep 24, 2013 9:38 pm

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: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck » Fri Sep 27, 2013 9:51 pm

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: 235
Joined: Fri Aug 23, 2013 11:29 am

Re: Hook for sub-contextual menu

Post by allends » Wed Oct 02, 2013 2:28 pm

This hook has been added.
Allen
Open Dental Software
http://www.opendental.com

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

Re: Hook for sub-contextual menu

Post by wjstarck » Wed Oct 02, 2013 2:33 pm

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: 936
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Hook for sub-contextual menu

Post by wjstarck » Fri Oct 04, 2013 9:20 am

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: 1647
Joined: Wed Jun 20, 2007 8:44 am
Location: Springfield, MO
Contact:

Re: Hook for sub-contextual menu

Post by drtech » Fri Oct 04, 2013 7:47 pm

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

Post Reply