System.Windows.Forms.ComboBoxRenderer.DrawTextBox Method

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

Syntax

public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string comboBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, TextFormatFlags flags, System.Windows.Forms.VisualStyles.ComboBoxState state)

Parameters

g
The System.Drawing.Graphics used to draw the text box.
bounds
The System.Drawing.Rectangle that specifies the bounds of the text box.
comboBoxText
The string to draw in the text box.
font
The System.Drawing.Font to apply to comboBoxText.
textBounds
The System.Drawing.Rectangle that specifies the bounds in which to draw comboBoxText.
flags
A bitwise combination of the System.Windows.Forms.TextFormatFlags values.
state
One of the System.Windows.Forms.VisualStyles.ComboBoxState values that specifies the visual state of the text box.

Remarks

Before calling this method, you should verify that the ComboBoxRenderer.IsSupported property returns true.

Requirements

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