System.Windows.Forms.ThemeWin32Classic.DrawButtonText C# (CSharp) Method

DrawButtonText() public method

public DrawButtonText ( Graphics g, ButtonBase button, Rectangle textBounds ) : void
g System.Drawing.Graphics
button ButtonBase
textBounds System.Drawing.Rectangle
return void
		public virtual void DrawButtonText (Graphics g, ButtonBase button, Rectangle textBounds)
		{
			// Ensure that at least one line is going to get displayed.
			// Line limit does not ensure that despite its description.
			textBounds.Height = Math.Max (textBounds.Height, button.Font.Height);
			
			if (button.Enabled)
				TextRenderer.DrawTextInternal (g, button.Text, button.Font, textBounds, button.ForeColor, button.TextFormatFlags, button.UseCompatibleTextRendering);
			else
				DrawStringDisabled20 (g, button.Text, button.Font, textBounds, button.BackColor, button.TextFormatFlags, button.UseCompatibleTextRendering);
		}
		#endregion
ThemeWin32Classic