VisualStyleRenderer.DrawText Metod

Definition

Ritar text inom angivna gränser.

Överlagringar

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

Ritar text i den angivna avgränsningsrektangeln med alternativet att visa inaktiverad text och använda annan textformatering.

DrawText(IDeviceContext, Rectangle, String)

Ritar text inom angivna gränser med standardformatering.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Ritar text inom angivna gränser med alternativet att visa inaktiverad text.

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

Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs

Ritar text i den angivna avgränsningsrektangeln med alternativet att visa inaktiverad text och använda annan textformatering.

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);
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)

Parametrar

dc
IDeviceContext

Används IDeviceContext för att rita texten.

bounds
Rectangle

A Rectangle som texten ska ritas i.

textToDraw
String

Texten som ska ritas.

drawDisabled
Boolean

trueför att rita nedtonad text; annars . false

flags
TextFormatFlags

En bitvis kombination av TextFormatFlags värdena.

Undantag

dc är null.

Gäller för

DrawText(IDeviceContext, Rectangle, String)

Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs

Ritar text inom angivna gränser med standardformatering.

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);
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)

Parametrar

dc
IDeviceContext

Används IDeviceContext för att rita texten.

bounds
Rectangle

A Rectangle som texten ska ritas i.

textToDraw
String

Texten som ska ritas.

Undantag

dc är null.

Gäller för

DrawText(IDeviceContext, Rectangle, String, Boolean)

Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs
Källa:
VisualStyleRenderer.cs

Ritar text inom angivna gränser med alternativet att visa inaktiverad 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);
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)

Parametrar

dc
IDeviceContext

Används IDeviceContext för att rita texten.

bounds
Rectangle

A Rectangle som texten ska ritas i.

textToDraw
String

Texten som ska ritas.

drawDisabled
Boolean

trueför att rita nedtonad text; annars . false

Undantag

dc är null.

Gäller för