GroupBoxRenderer::DrawGroupBox Method (Graphics^, Rectangle, String^, Font^, Color, TextFormatFlags, GroupBoxState)
.NET Framework (current version)
Draws a group box control in the specified state and bounds, with the specified text, font, color, and text formatting.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: static void DrawGroupBox( Graphics^ g, Rectangle bounds, String^ groupBoxText, Font^ font, Color textColor, TextFormatFlags flags, GroupBoxState state )
Parameters
- g
-
Type:
System.Drawing::Graphics^
The Graphics used to draw the group box.
- bounds
-
Type:
System.Drawing::Rectangle
The Rectangle that specifies the bounds of the group box.
- groupBoxText
-
Type:
System::String^
The String to draw with the group box.
- font
-
Type:
System.Drawing::Font^
The Font to apply to groupBoxText.
- textColor
-
Type:
System.Drawing::Color
The Color to apply to groupBoxText.
- flags
-
Type:
System.Windows.Forms::TextFormatFlags
A bitwise combination of the TextFormatFlags values.
- state
-
Type:
System.Windows.Forms.VisualStyles::GroupBoxState
One of the GroupBoxState values that specifies the visual state of the group box.
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.
.NET Framework
Available since 2.0
Available since 2.0
Show: