System.Windows.Forms.GroupBoxRenderer.DrawGroupBox Method

Draws a group box control in the specified state and bounds, with the specified text, font, and color.

Syntax

public static void DrawGroupBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string groupBoxText, System.Drawing.Font font, System.Drawing.Color textColor, System.Windows.Forms.VisualStyles.GroupBoxState state)

Parameters

g
The System.Drawing.Graphics used to draw the group box.
bounds
The System.Drawing.Rectangle that specifies the bounds of the group box.
groupBoxText
The string to draw with the group box.
font
The System.Drawing.Font to apply to groupBoxText.
textColor
The System.Drawing.Color to apply to groupBoxText.
state
One of the System.Windows.Forms.VisualStyles.GroupBoxState values that specifies the visual state of the group box.

Remarks

If visual styles are enabled in the operating system and visual styles are applied to the current application, this method will draw the group box with the current visual style. Otherwise, this method will draw the group box with the classic Windows style.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0