Page 1 of 1

Hook request - ContrChart.pd2_PrintPage()

Posted: Wed Nov 26, 2014 8:44 pm
by wjstarck
Hi-

Could I have the following hook in the middle of pd2_PrintPage method on ContrChart (should be after about line 9270):

yPos+=(int)g.MeasureString(text,headingFont).Height;
text = PatCur.GetNameFL();//name
if(g.MeasureString(text,subHeadingFont).Width>700) {
//extremely long name
text=PatCur.GetNameFirst()[0]+". "+PatCur.LName;//example: J. Sparks
}

Code: Select all

            //this hook changes the printed header on the top of printed progress notes
            string[] headerText = {text};
            Plugins.HookAddCode(this,"ContrChart.pd2_PrintPage_middle",PatCur,e,g,headerText);
            text = headerText[0];
            //end hook
g.DrawString(text,subHeadingFont,Brushes.Black,400-g.MeasureString(text,subHeadingFont).Width/2,yPos);
text="Page "+(pagesPrinted+1);

g.DrawString(text,subHeadingFont,Brushes.Black,800-g.MeasureString(text,subHeadingFont).Width,yPos);
yPos+=30;

If I could have it in OD 14.3 and later that would be super :D

Thanks,

Re: Hook request - ContrChart.pd2_PrintPage()

Posted: Thu Dec 11, 2014 1:21 pm
by wjstarck
Any idea when you'll be able to get to this one?

:o

Re: Hook request - ContrChart.pd2_PrintPage()

Posted: Thu Dec 11, 2014 1:26 pm
by allends
Sorry, I meant to comment on this before.

I have added this to version 14.3.24 (sans comment code) and it will be available when it is released.

Re: Hook request - ContrChart.pd2_PrintPage()

Posted: Thu Dec 11, 2014 2:16 pm
by wjstarck
Awesome thanks