|
-
Dec 23rd, 2007, 04:27 AM
#2
Re: [2.0] An accurate formula to measure the length of a string (drawing)
From a previous thread of yours I assume that this code is being executed inside a class derived from Button. In that case there's no need to do what you're doing. Just override the OnPaintBackground method instead of OnPaint.
That said, for future reference you have the Graphics.MeasureString and .MeasureCharacterRanges methods. I believe that MeasureCharacterRanges is more reliable in some situations.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|