GroupBoxRenderer Class

 

Provides methods used to render a group box control with or without visual styles. This class cannot be inherited.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

System.Object
  System.Windows.Forms.GroupBoxRenderer

[<Sealed>]
type GroupBoxRenderer = class end

NameDescription
System_CAPS_pubpropertySystem_CAPS_staticRenderMatchingApplicationState

Gets or sets a value indicating whether the renderer uses the application state to determine rendering style.

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticDrawGroupBox(Graphics, Rectangle, GroupBoxState)

Draws a group box control in the specified state and bounds.

System_CAPS_pubmethodSystem_CAPS_staticDrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)

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

System_CAPS_pubmethodSystem_CAPS_staticDrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)

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

System_CAPS_pubmethodSystem_CAPS_staticDrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)

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

System_CAPS_pubmethodSystem_CAPS_staticDrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)

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

System_CAPS_pubmethodSystem_CAPS_staticDrawParentBackground(Graphics, Rectangle, Control)

Draws the background of a control's parent in the specified area.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticIsBackgroundPartiallyTransparent(GroupBoxState)

Indicates whether the background of the group box has any semitransparent or alpha-blended pieces.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The GroupBoxRenderer class provides a set of static methods that can be used to render a group box control. Rendering a control refers to drawing the user interface of a control. To draw a group box, use one of the DrawGroupBox methods. These methods provide a variety of text drawing options.

If visual styles are enabled in the operating system and visual styles are applied to the current application, DrawGroupBox will draw the group box with the current visual style. Otherwise, DrawGroupBox will draw the group box with the classic Windows style. This is useful if you are drawing a custom control that should automatically match the current visual style setting of the operating system.

This class wraps the functionality of a System.Windows.Forms.VisualStyles.VisualStyleRenderer that is set to one of the elements exposed by the System.Windows.Forms.VisualStyles.VisualStyleElement.Button.GroupBox class. For more information, see Rendering Controls with Visual Styles.

WinXpFamily

Visual styles are supported only on these platforms.

The following code example demonstrates how to create a custom control that uses the DrawGroupBox method to draw a group box with a double border if visual styles are enabled.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0

Any public static ( Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: