venAdder
February 22nd, 2006, 04:00 PM
Hi,
I am confused by some values returned by graphics.MeasureString method
g.MeasureString(Convert.ToString(sb), PrintFont).Width is following:
g-valid graphics object, PrintFont is constant for both calls and value of Convert.ToString(sb) is as follows
" Item "
width returned is 177.soemthingsomething
" Item l"
width returned is 333.something.
How does adding one extra character make such a huge difference?
Also if i add this extra character the string is printed what it should be printed as, but if I omit l at the end all the trailing spaces are truncated and the string is printed!!!!!!!
What is going on over here?
Help will be highly appreciated. Thank You
I am confused by some values returned by graphics.MeasureString method
g.MeasureString(Convert.ToString(sb), PrintFont).Width is following:
g-valid graphics object, PrintFont is constant for both calls and value of Convert.ToString(sb) is as follows
" Item "
width returned is 177.soemthingsomething
" Item l"
width returned is 333.something.
How does adding one extra character make such a huge difference?
Also if i add this extra character the string is printed what it should be printed as, but if I omit l at the end all the trailing spaces are truncated and the string is printed!!!!!!!
What is going on over here?
Help will be highly appreciated. Thank You