GroupBoxRenderer.DrawGroupBox Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Zeichnet ein Gruppenfeld-Steuerelement.
Überlädt
| Name | Beschreibung |
|---|---|
| DrawGroupBox(Graphics, Rectangle, GroupBoxState) |
Zeichnet ein Gruppenfeld-Steuerelement im angegebenen Zustand und an den Grenzen. |
| DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) |
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text und der angegebenen Schriftart. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState) |
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart und der Farbe. |
| DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState) |
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart und der Textformatierung. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState) |
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart, der Farbe und der Textformatierung. |
DrawGroupBox(Graphics, Rectangle, GroupBoxState)
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
Zeichnet ein Gruppenfeld-Steuerelement im angegebenen Zustand und an den Grenzen.
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
Einer der GroupBoxState Werte, der den visuellen Zustand des Gruppenfelds angibt.
Beispiele
Im folgenden Codebeispiel wird die Methode in der DrawGroupBox(Graphics, Rectangle, GroupBoxState) Methode eines benutzerdefinierten Steuerelements OnPaint verwendet, um ein Gruppenfeld mit einem doppelten Rahmen zu zeichnen. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die GroupBoxRenderer Klasse bereitgestellt wird.
// 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
Hinweise
Wenn visuelle Formatvorlagen im Betriebssystem aktiviert sind und visuelle Formatvorlagen auf die aktuelle Anwendung angewendet werden, zeichnet diese Methode das Gruppenfeld mit der aktuellen visuellen Formatvorlage. Andernfalls zeichnet diese Methode das Gruppenfeld mit der klassischen Windows Formatvorlage.
Gilt für:
DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text und der angegebenen Schriftart.
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
Einer der GroupBoxState Werte, der den visuellen Zustand des Gruppenfelds angibt.
Beispiele
Im folgenden Codebeispiel wird die Methode in der DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) Methode eines benutzerdefinierten Steuerelements OnPaint verwendet, um ein Gruppenfeld mit einem doppelten Rahmen zu zeichnen. Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die GroupBoxRenderer Klasse bereitgestellt wird.
// 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
Hinweise
Wenn visuelle Formatvorlagen im Betriebssystem aktiviert sind und visuelle Formatvorlagen auf die aktuelle Anwendung angewendet werden, zeichnet diese Methode das Gruppenfeld mit der aktuellen visuellen Formatvorlage. Andernfalls zeichnet diese Methode das Gruppenfeld mit der klassischen Windows Formatvorlage.
Gilt für:
DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart und der Farbe.
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
Einer der GroupBoxState Werte, der den visuellen Zustand des Gruppenfelds angibt.
Hinweise
Wenn visuelle Formatvorlagen im Betriebssystem aktiviert sind und visuelle Formatvorlagen auf die aktuelle Anwendung angewendet werden, zeichnet diese Methode das Gruppenfeld mit der aktuellen visuellen Formatvorlage. Andernfalls zeichnet diese Methode das Gruppenfeld mit der klassischen Windows Formatvorlage.
Gilt für:
DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart und der Textformatierung.
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
Eine bitweise Kombination der TextFormatFlags Werte.
- state
- GroupBoxState
Einer der GroupBoxState Werte, der den visuellen Zustand des Gruppenfelds angibt.
Hinweise
Wenn visuelle Formatvorlagen im Betriebssystem aktiviert sind und visuelle Formatvorlagen auf die aktuelle Anwendung angewendet werden, zeichnet diese Methode das Gruppenfeld mit der aktuellen visuellen Formatvorlage. Andernfalls zeichnet diese Methode das Gruppenfeld mit der klassischen Windows Formatvorlage.
Gilt für:
DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
- Quelle:
- GroupBoxRenderer.cs
Zeichnet ein Gruppenfeld-Steuerelement in den angegebenen Zustand und Grenzen mit dem angegebenen Text, der Schriftart, der Farbe und der Textformatierung.
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
Eine bitweise Kombination der TextFormatFlags Werte.
- state
- GroupBoxState
Einer der GroupBoxState Werte, der den visuellen Zustand des Gruppenfelds angibt.
Hinweise
Wenn visuelle Formatvorlagen im Betriebssystem aktiviert sind und visuelle Formatvorlagen auf die aktuelle Anwendung angewendet werden, zeichnet diese Methode das Gruppenfeld mit der aktuellen visuellen Formatvorlage. Andernfalls zeichnet diese Methode das Gruppenfeld mit der klassischen Windows Formatvorlage.