VisualStyleRenderer.DrawText Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
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
yang IDeviceContext digunakan untuk 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
yang IDeviceContext digunakan untuk 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
yang IDeviceContext digunakan untuk menggambar teks.
- textToDraw
- String
Teks yang akan digambar.
- drawDisabled
- Boolean
true untuk menggambar teks berwarna abu-abu; jika tidak, false.
Pengecualian
dc adalah null.