I am painting on my buttons, however the painting erases the text on them, so I am trying to use 'DrawString' to write it back on them...
However, I need to accurately measure the length of what the string will be when it is drawn to the button... I also can't specifically position the text on the button because I have an array of multiple buttons, with different text...
I currently have:
I've tried font.Height works perfectly for the height of the string, but font.Width * button.Text.Length, does not work properly?Code:e.Graphics.DrawString(button.Text, new Font(button.Font.OriginalFontName, button.Font.Size), Brushes.Red, new Point(0, 0));
Any idea's?
Thanks




Reply With Quote