GroupBoxRenderer.DrawGroupBox 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.
Gambar kontrol kotak grup.
Overload
| Nama | Deskripsi |
|---|---|
| DrawGroupBox(Graphics, Rectangle, GroupBoxState) |
Gambar kontrol kotak grup dalam status dan batas yang ditentukan. |
| DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) |
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan teks dan font yang ditentukan. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState) |
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan teks, font, dan warna yang ditentukan. |
| DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState) |
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan pemformatan teks, font, dan teks yang ditentukan. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState) |
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan pemformatan teks, font, warna, dan teks yang ditentukan. |
DrawGroupBox(Graphics, Rectangle, GroupBoxState)
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
Gambar kontrol kotak grup dalam status dan batas yang ditentukan.
public:
static void DrawGroupBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.GroupBoxState state);
static member DrawGroupBox : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.GroupBoxState -> unit
Public Shared Sub DrawGroupBox (g As Graphics, bounds As Rectangle, state As GroupBoxState)
Parameter
- state
- GroupBoxState
Salah GroupBoxState satu nilai yang menentukan status visual kotak grup.
Contoh
Contoh kode berikut menggunakan DrawGroupBox(Graphics, Rectangle, GroupBoxState) metode dalam metode kontrol OnPaint kustom untuk menggambar kotak grup dengan batas ganda. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk GroupBoxRenderer kelas .
// Draw the group box in the current state.
protected:
virtual void OnPaint(PaintEventArgs^ e) override
{
__super::OnPaint(e);
GroupBoxRenderer::DrawGroupBox(e->Graphics, ClientRectangle,
this->Text, this->Font, state);
// Draw an additional inner border if visual styles are enabled.
if (Application::RenderWithVisualStyles)
{
GroupBoxRenderer::DrawGroupBox(e->Graphics, innerRectangle,
state);
}
}
// Draw the group box in the current state.
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
GroupBoxRenderer.DrawGroupBox(e.Graphics, ClientRectangle,
this.Text, this.Font, state);
// Draw an additional inner border if visual styles are enabled.
if (Application.RenderWithVisualStyles)
{
GroupBoxRenderer.DrawGroupBox(e.Graphics, innerRectangle, state);
}
}
' Draw the group box in the current state.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
GroupBoxRenderer.DrawGroupBox(e.Graphics, ClientRectangle, Me.Text, Me.Font, state)
' Draw an additional inner border if visual styles are enabled.
If Application.RenderWithVisualStyles Then
GroupBoxRenderer.DrawGroupBox(e.Graphics, innerRectangle, state)
End If
End Sub
Keterangan
Jika gaya visual diaktifkan dalam sistem operasi dan gaya visual diterapkan ke aplikasi saat ini, metode ini akan menggambar kotak grup dengan gaya visual saat ini. Jika tidak, metode ini akan menggambar kotak grup dengan gaya Windows klasik.
Berlaku untuk
DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan teks dan font yang ditentukan.
public:
static void DrawGroupBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ groupBoxText, System::Drawing::Font ^ font, System::Windows::Forms::VisualStyles::GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string groupBoxText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? groupBoxText, System.Drawing.Font? font, System.Windows.Forms.VisualStyles.GroupBoxState state);
static member DrawGroupBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.VisualStyles.GroupBoxState -> unit
Public Shared Sub DrawGroupBox (g As Graphics, bounds As Rectangle, groupBoxText As String, font As Font, state As GroupBoxState)
Parameter
- state
- GroupBoxState
Salah GroupBoxState satu nilai yang menentukan status visual kotak grup.
Contoh
Contoh kode berikut menggunakan DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) metode dalam metode kontrol OnPaint kustom untuk menggambar kotak grup dengan batas ganda. Contoh kode ini adalah bagian dari contoh yang lebih besar yang disediakan untuk GroupBoxRenderer kelas .
// Draw the group box in the current state.
protected:
virtual void OnPaint(PaintEventArgs^ e) override
{
__super::OnPaint(e);
GroupBoxRenderer::DrawGroupBox(e->Graphics, ClientRectangle,
this->Text, this->Font, state);
// Draw an additional inner border if visual styles are enabled.
if (Application::RenderWithVisualStyles)
{
GroupBoxRenderer::DrawGroupBox(e->Graphics, innerRectangle,
state);
}
}
// Draw the group box in the current state.
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
GroupBoxRenderer.DrawGroupBox(e.Graphics, ClientRectangle,
this.Text, this.Font, state);
// Draw an additional inner border if visual styles are enabled.
if (Application.RenderWithVisualStyles)
{
GroupBoxRenderer.DrawGroupBox(e.Graphics, innerRectangle, state);
}
}
' Draw the group box in the current state.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
GroupBoxRenderer.DrawGroupBox(e.Graphics, ClientRectangle, Me.Text, Me.Font, state)
' Draw an additional inner border if visual styles are enabled.
If Application.RenderWithVisualStyles Then
GroupBoxRenderer.DrawGroupBox(e.Graphics, innerRectangle, state)
End If
End Sub
Keterangan
Jika gaya visual diaktifkan dalam sistem operasi dan gaya visual diterapkan ke aplikasi saat ini, metode ini akan menggambar kotak grup dengan gaya visual saat ini. Jika tidak, metode ini akan menggambar kotak grup dengan gaya Windows klasik.
Berlaku untuk
DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan teks, font, dan warna yang ditentukan.
public:
static void DrawGroupBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ groupBoxText, System::Drawing::Font ^ font, System::Drawing::Color textColor, System::Windows::Forms::VisualStyles::GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string groupBoxText, System.Drawing.Font font, System.Drawing.Color textColor, System.Windows.Forms.VisualStyles.GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? groupBoxText, System.Drawing.Font? font, System.Drawing.Color textColor, System.Windows.Forms.VisualStyles.GroupBoxState state);
static member DrawGroupBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Color * System.Windows.Forms.VisualStyles.GroupBoxState -> unit
Public Shared Sub DrawGroupBox (g As Graphics, bounds As Rectangle, groupBoxText As String, font As Font, textColor As Color, state As GroupBoxState)
Parameter
- state
- GroupBoxState
Salah GroupBoxState satu nilai yang menentukan status visual kotak grup.
Keterangan
Jika gaya visual diaktifkan dalam sistem operasi dan gaya visual diterapkan ke aplikasi saat ini, metode ini akan menggambar kotak grup dengan gaya visual saat ini. Jika tidak, metode ini akan menggambar kotak grup dengan gaya Windows klasik.
Berlaku untuk
DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan pemformatan teks, font, dan teks yang ditentukan.
public:
static void DrawGroupBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ groupBoxText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string groupBoxText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? groupBoxText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.GroupBoxState state);
static member DrawGroupBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.GroupBoxState -> unit
Public Shared Sub DrawGroupBox (g As Graphics, bounds As Rectangle, groupBoxText As String, font As Font, flags As TextFormatFlags, state As GroupBoxState)
Parameter
- flags
- TextFormatFlags
Kombinasi bitwise dari TextFormatFlags nilai.
- state
- GroupBoxState
Salah GroupBoxState satu nilai yang menentukan status visual kotak grup.
Keterangan
Jika gaya visual diaktifkan dalam sistem operasi dan gaya visual diterapkan ke aplikasi saat ini, metode ini akan menggambar kotak grup dengan gaya visual saat ini. Jika tidak, metode ini akan menggambar kotak grup dengan gaya Windows klasik.
Berlaku untuk
DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
- Sumber:
- GroupBoxRenderer.cs
Gambar kontrol kotak grup dalam status dan batas yang ditentukan, dengan pemformatan teks, font, warna, dan teks yang ditentukan.
public:
static void DrawGroupBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ groupBoxText, System::Drawing::Font ^ font, System::Drawing::Color textColor, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string groupBoxText, System.Drawing.Font font, System.Drawing.Color textColor, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.GroupBoxState state);
public static void DrawGroupBox(System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? groupBoxText, System.Drawing.Font? font, System.Drawing.Color textColor, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.GroupBoxState state);
static member DrawGroupBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Color * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.GroupBoxState -> unit
Public Shared Sub DrawGroupBox (g As Graphics, bounds As Rectangle, groupBoxText As String, font As Font, textColor As Color, flags As TextFormatFlags, state As GroupBoxState)
Parameter
- flags
- TextFormatFlags
Kombinasi bitwise dari TextFormatFlags nilai.
- state
- GroupBoxState
Salah GroupBoxState satu nilai yang menentukan status visual kotak grup.
Keterangan
Jika gaya visual diaktifkan dalam sistem operasi dan gaya visual diterapkan ke aplikasi saat ini, metode ini akan menggambar kotak grup dengan gaya visual saat ini. Jika tidak, metode ini akan menggambar kotak grup dengan gaya Windows klasik.