PRINT HEADER
-
can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }
-
can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }
Can you add the underline style to the font? Font font = new System.Drawing.Font(family,size,FontStyle::Underline); Why not ask your question on the appropriate message board for the language you're using? :) Mark
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
can any one pls help me to underline the headding of my print page.i wrote a code like this..i dont know how to write code for underline. public void DrawHeading(Graphics g,string heading,string family,float size,string header) { Font font = new System.Drawing.Font(family,size); SolidBrush ForeBrush = new SolidBrush(Color.Black); g.DrawString(heading+ " - "+header,font,ForeBrush,40,20); }
Hi, measure the width of the header (g.MeasureString), and draw a line (g.DrawLine) of that length at an appropriate point. :)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips: - make Visual display line numbers: Tools/Options/TextEditor/... - show exceptions with ToString() to see all information - before you ask a question here, search CodeProject, then Google