Bahasa

VisualStyleRenderer.DrawText Metode

Definisi

Menggambar teks dalam batas yang ditentukan.

Overload

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

Menggambar teks dalam persegi panjang pembatas yang ditentukan dengan opsi menampilkan teks yang dinonaktifkan dan menerapkan pemformatan teks lainnya.

DrawText(IDeviceContext, Rectangle, String)

Menggambar teks dalam batas yang ditentukan menggunakan pemformatan default.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Menggambar teks dalam batas yang ditentukan dengan opsi menampilkan teks yang dinonaktifkan.

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

Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs

Menggambar teks dalam persegi panjang pembatas yang ditentukan dengan opsi menampilkan teks yang dinonaktifkan dan menerapkan pemformatan teks lainnya.

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)

Parameter

dc
IDeviceContext

yang IDeviceContext digunakan untuk menggambar teks.

bounds
Rectangle

untuk Rectangle menggambar teks.

textToDraw
String

Teks yang akan digambar.

drawDisabled
Boolean

true untuk menggambar teks berwarna abu-abu; jika tidak, false.

flags
TextFormatFlags

Kombinasi bitwise dari TextFormatFlags nilai.

Pengecualian

dc adalah null.

Berlaku untuk

DrawText(IDeviceContext, Rectangle, String)

Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs

Menggambar teks dalam batas yang ditentukan menggunakan pemformatan default.

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)

Parameter

dc
IDeviceContext

yang IDeviceContext digunakan untuk menggambar teks.

bounds
Rectangle

untuk Rectangle menggambar teks.

textToDraw
String

Teks yang akan digambar.

Pengecualian

dc adalah null.

Berlaku untuk

DrawText(IDeviceContext, Rectangle, String, Boolean)

Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs
Sumber:
VisualStyleRenderer.cs

Menggambar teks dalam batas yang ditentukan dengan opsi menampilkan teks yang dinonaktifkan.

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)

Parameter

dc
IDeviceContext

yang IDeviceContext digunakan untuk menggambar teks.

bounds
Rectangle

untuk Rectangle menggambar teks.

textToDraw
String

Teks yang akan digambar.

drawDisabled
Boolean

true untuk menggambar teks berwarna abu-abu; jika tidak, false.

Pengecualian

dc adalah null.

Berlaku untuk