GroupBoxRenderer.DrawGroupBox Yöntem

Tanım

Bir grup kutusu denetimi çizer.

Aşırı Yüklemeler

DrawGroupBox(Graphics, Rectangle, GroupBoxState)

Belirtilen durumda ve sınırlarda bir grup kutusu denetimi çizer.

DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin ve yazı tipiyle bir grup kutusu denetimi çizer.

DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi ve renkle bir grup kutusu denetimi çizer.

DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi ve metin biçimlendirmesiyle bir grup kutusu denetimi çizer.

DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi, renk ve metin biçimlendirmesiyle bir grup kutusu denetimi çizer.

DrawGroupBox(Graphics, Rectangle, GroupBoxState)

Belirtilen durumda ve sınırlarda bir grup kutusu denetimi çizer.

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)

Parametreler

g
Graphics

Grup Graphics kutusunu çizmek için kullanılan.

bounds
Rectangle

Grup Rectangle kutusunun sınırlarını belirten.

state
GroupBoxState

GroupBoxState Grup kutusunun görsel durumunu belirten değerlerden biri.

Örnekler

Aşağıdaki kod örneği, çift kenarlıklı bir grup kutusu çizmek için özel denetimin OnPaint yönteminde yöntemini kullanırDrawGroupBox(Graphics, Rectangle, GroupBoxState). Bu kod örneği, sınıfı için GroupBoxRenderer sağlanan daha büyük bir örneğin parçasıdır.

    // 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

Açıklamalar

İşletim sisteminde görsel stiller etkinleştirilirse ve görsel stilleri geçerli uygulamaya uygulanırsa, bu yöntem geçerli görsel stiline sahip grup kutusunu çizer. Aksi takdirde, bu yöntem grup kutusunu klasik Windows stiliyle çizer.

Şunlara uygulanır

DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin ve yazı tipiyle bir grup kutusu denetimi çizer.

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)

Parametreler

g
Graphics

Grup Graphics kutusunu çizmek için kullanılan.

bounds
Rectangle

Grup Rectangle kutusunun sınırlarını belirten.

groupBoxText
String

String Grup kutusuyla çizmek için.

font
Font

Font için geçerli olacaktırgroupBoxText.

state
GroupBoxState

GroupBoxState Grup kutusunun görsel durumunu belirten değerlerden biri.

Örnekler

Aşağıdaki kod örneği, çift kenarlıklı bir grup kutusu çizmek için özel denetimin OnPaint yönteminde yöntemini kullanırDrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState). Bu kod örneği, sınıfı için GroupBoxRenderer sağlanan daha büyük bir örneğin parçasıdır.

    // 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

Açıklamalar

İşletim sisteminde görsel stiller etkinleştirilirse ve görsel stilleri geçerli uygulamaya uygulanırsa, bu yöntem geçerli görsel stiline sahip grup kutusunu çizer. Aksi takdirde, bu yöntem grup kutusunu klasik Windows stiliyle çizer.

Şunlara uygulanır

DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi ve renkle bir grup kutusu denetimi çizer.

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)

Parametreler

g
Graphics

Grup Graphics kutusunu çizmek için kullanılan.

bounds
Rectangle

Grup Rectangle kutusunun sınırlarını belirten.

groupBoxText
String

String Grup kutusuyla çizmek için.

font
Font

Font için geçerli olacaktırgroupBoxText.

textColor
Color

Color için geçerli olacaktırgroupBoxText.

state
GroupBoxState

GroupBoxState Grup kutusunun görsel durumunu belirten değerlerden biri.

Açıklamalar

İşletim sisteminde görsel stiller etkinleştirilirse ve görsel stilleri geçerli uygulamaya uygulanırsa, bu yöntem geçerli görsel stiline sahip grup kutusunu çizer. Aksi takdirde, bu yöntem grup kutusunu klasik Windows stiliyle çizer.

Şunlara uygulanır

DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi ve metin biçimlendirmesiyle bir grup kutusu denetimi çizer.

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)

Parametreler

g
Graphics

Grup Graphics kutusunu çizmek için kullanılan.

bounds
Rectangle

Grup Rectangle kutusunun sınırlarını belirten.

groupBoxText
String

String Grup kutusuyla çizmek için.

font
Font

Font için geçerli olacaktırgroupBoxText.

flags
TextFormatFlags

Değerlerin bit düzeyinde birleşimi TextFormatFlags .

state
GroupBoxState

GroupBoxState Grup kutusunun görsel durumunu belirten değerlerden biri.

Açıklamalar

İşletim sisteminde görsel stiller etkinleştirilirse ve görsel stilleri geçerli uygulamaya uygulanırsa, bu yöntem geçerli görsel stiline sahip grup kutusunu çizer. Aksi takdirde, bu yöntem grup kutusunu klasik Windows stiliyle çizer.

Şunlara uygulanır

DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)

Belirtilen durumda ve sınırlarda, belirtilen metin, yazı tipi, renk ve metin biçimlendirmesiyle bir grup kutusu denetimi çizer.

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)

Parametreler

g
Graphics

Grup Graphics kutusunu çizmek için kullanılan.

bounds
Rectangle

Grup Rectangle kutusunun sınırlarını belirten.

groupBoxText
String

String Grup kutusuyla çizmek için.

font
Font

Font için geçerli olacaktırgroupBoxText.

textColor
Color

Color için geçerli olacaktırgroupBoxText.

flags
TextFormatFlags

Değerlerin bit düzeyinde birleşimi TextFormatFlags .

state
GroupBoxState

GroupBoxState Grup kutusunun görsel durumunu belirten değerlerden biri.

Açıklamalar

İşletim sisteminde görsel stiller etkinleştirilirse ve görsel stilleri geçerli uygulamaya uygulanırsa, bu yöntem geçerli görsel stiline sahip grup kutusunu çizer. Aksi takdirde, bu yöntem grup kutusunu klasik Windows stiliyle çizer.

Şunlara uygulanır