Middle Text line
C#
2
Posts
2
Posters
0
Views
1
Watching
-
i have a problem to draw the graphic line i want to draw a line that the middle of this line have text ( that enter from user ) is there any code that can help me ? With thanks MHF
Use the
Graphics.MeasureString
method to get the width of the text when drawn with a specific font. Use this value to calculate the starting point passed to theGraphics.DrawString
method, so that the text will be drawn in the middle of your line.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook