VisualStyleRenderer.DrawText VisualStyleRenderer.DrawText VisualStyleRenderer.DrawText VisualStyleRenderer.DrawText Method

Definition

Draws text in the specified bounds.

Overloads

DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)

Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting.

DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String)

Draws text in the specified bounds using default formatting.

DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean)

Draws text in the specified bounds with the option of displaying disabled text.

DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags) DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)

Draws text in the specified bounding rectangle with the option of displaying disabled text and applying other text formatting.

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled, System::Windows::Forms::TextFormatFlags flags);
public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled, System.Windows.Forms.TextFormatFlags flags);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool * System.Windows.Forms.TextFormatFlags -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean, flags As TextFormatFlags)

Parameters

bounds
Rectangle Rectangle Rectangle Rectangle

A Rectangle in which to draw the text.

textToDraw
String String String String

The text to draw.

drawDisabled
Boolean Boolean Boolean Boolean

true to draw grayed-out text; otherwise, false.

Exceptions

DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String) DrawText(IDeviceContext, Rectangle, String)

Draws text in the specified bounds using default formatting.

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw);
public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String)

Parameters

bounds
Rectangle Rectangle Rectangle Rectangle

A Rectangle in which to draw the text.

textToDraw
String String String String

The text to draw.

Exceptions

DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean) DrawText(IDeviceContext, Rectangle, String, Boolean)

Draws text in the specified bounds with the option of displaying disabled text.

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled);
public void DrawText (System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean)

Parameters

bounds
Rectangle Rectangle Rectangle Rectangle

A Rectangle in which to draw the text.

textToDraw
String String String String

The text to draw.

drawDisabled
Boolean Boolean Boolean Boolean

true to draw grayed-out text; otherwise, false.

Exceptions

Applies to