GroupBoxRenderer.DrawGroupBox Metoda
Definicja
Ważny
Niektóre informacje dotyczą produktów przedpremierowych, które mogą zostać znacznie zmodyfikowane przed premierą. Microsoft nie udziela żadnych gwarancji, ani wyraźnych, ani domniemanych, dotyczących informacji podanych tutaj.
Rysuje kontrolkę pola grupy.
Przeciążenia
| Nazwa | Opis |
|---|---|
| DrawGroupBox(Graphics, Rectangle, GroupBoxState) |
Rysuje kontrolkę pola grupy w określonym stanie i granicach. |
| DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) |
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem i czcionką. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState) |
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką i kolorem. |
| DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState) |
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką i formatowaniem tekstu. |
| DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState) |
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką, kolorem i formatowaniem tekstu. |
DrawGroupBox(Graphics, Rectangle, GroupBoxState)
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
Rysuje kontrolkę pola grupy w określonym stanie i granicach.
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)
Parametry
- state
- GroupBoxState
GroupBoxState Jedna z wartości określających stan wizualny pola grupy.
Przykłady
Poniższy przykład kodu używa DrawGroupBox(Graphics, Rectangle, GroupBoxState) metody w metodzie niestandardowej kontrolki OnPaint , aby narysować pole grupy z podwójnym obramowaniem. Ten przykład kodu jest częścią większego przykładu podanego GroupBoxRenderer dla klasy.
// 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
Uwagi
Jeśli style wizualne są włączone w systemie operacyjnym, a style wizualne są stosowane do bieżącej aplikacji, ta metoda narysuje pole grupy z bieżącym stylem wizualizacji. W przeciwnym razie ta metoda narysuje pole grupy z klasycznym stylem systemu Windows.
Dotyczy
DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState)
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem i czcionką.
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)
Parametry
- state
- GroupBoxState
GroupBoxState Jedna z wartości określających stan wizualny pola grupy.
Przykłady
Poniższy przykład kodu używa DrawGroupBox(Graphics, Rectangle, String, Font, GroupBoxState) metody w metodzie niestandardowej kontrolki OnPaint , aby narysować pole grupy z podwójnym obramowaniem. Ten przykład kodu jest częścią większego przykładu podanego GroupBoxRenderer dla klasy.
// 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
Uwagi
Jeśli style wizualne są włączone w systemie operacyjnym, a style wizualne są stosowane do bieżącej aplikacji, ta metoda narysuje pole grupy z bieżącym stylem wizualizacji. W przeciwnym razie ta metoda narysuje pole grupy z klasycznym stylem systemu Windows.
Dotyczy
DrawGroupBox(Graphics, Rectangle, String, Font, Color, GroupBoxState)
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką i kolorem.
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)
Parametry
- state
- GroupBoxState
GroupBoxState Jedna z wartości określających stan wizualny pola grupy.
Uwagi
Jeśli style wizualne są włączone w systemie operacyjnym, a style wizualne są stosowane do bieżącej aplikacji, ta metoda narysuje pole grupy z bieżącym stylem wizualizacji. W przeciwnym razie ta metoda narysuje pole grupy z klasycznym stylem systemu Windows.
Dotyczy
DrawGroupBox(Graphics, Rectangle, String, Font, TextFormatFlags, GroupBoxState)
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką i formatowaniem tekstu.
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)
Parametry
- flags
- TextFormatFlags
Bitowa kombinacja TextFormatFlags wartości.
- state
- GroupBoxState
GroupBoxState Jedna z wartości określających stan wizualny pola grupy.
Uwagi
Jeśli style wizualne są włączone w systemie operacyjnym, a style wizualne są stosowane do bieżącej aplikacji, ta metoda narysuje pole grupy z bieżącym stylem wizualizacji. W przeciwnym razie ta metoda narysuje pole grupy z klasycznym stylem systemu Windows.
Dotyczy
DrawGroupBox(Graphics, Rectangle, String, Font, Color, TextFormatFlags, GroupBoxState)
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
- Źródło:
- GroupBoxRenderer.cs
Rysuje kontrolkę pola grupy w określonym stanie i granicach z określonym tekstem, czcionką, kolorem i formatowaniem tekstu.
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)
Parametry
- flags
- TextFormatFlags
Bitowa kombinacja TextFormatFlags wartości.
- state
- GroupBoxState
GroupBoxState Jedna z wartości określających stan wizualny pola grupy.
Uwagi
Jeśli style wizualne są włączone w systemie operacyjnym, a style wizualne są stosowane do bieżącej aplikacji, ta metoda narysuje pole grupy z bieżącym stylem wizualizacji. W przeciwnym razie ta metoda narysuje pole grupy z klasycznym stylem systemu Windows.