System.Windows.Forms.RadioButtonRenderer.DrawRadioButton Method

Draws an option button control (also known as a radio button) in the specified state and location, with the specified text and image, and with an optional focus rectangle.

Syntax

public static void DrawRadioButton (System.Drawing.Graphics g, System.Drawing.Point glyphLocation, System.Drawing.Rectangle textBounds, string radioButtonText, System.Drawing.Font font, System.Drawing.Image image, System.Drawing.Rectangle imageBounds, bool focused, System.Windows.Forms.VisualStyles.RadioButtonState state)

Parameters

g
The System.Drawing.Graphics used to draw the option button.
glyphLocation
The System.Drawing.Point to draw the option button glyph at.
textBounds
The System.Drawing.Rectangle to draw radioButtonText in.
radioButtonText
The string to draw with the option button.
font
The System.Drawing.Font to apply to radioButtonText.
image
The System.Drawing.Image to draw with the option button.
imageBounds
The System.Drawing.Rectangle to draw image in.
focused
true to draw a focus rectangle; otherwise, false.
state
One of the System.Windows.Forms.VisualStyles.RadioButtonState values that specifies the visual state of the option button.

Remarks

If visual styles are enabled in the operating system and visual styles are applied to the current application, this method will draw the option button with the current visual style. Otherwise, this method will draw the option button 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