TextBoxRenderer.DrawTextBox Yöntem

Tanım

İşletim sisteminin geçerli görsel stiliyle bir metin kutusu denetimi çizer.

Aşırı Yüklemeler

DrawTextBox(Graphics, Rectangle, TextBoxState)

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

DrawTextBox(Graphics, Rectangle, String, Font, TextBoxState)

Belirtilen durumda ve sınırlarda ve belirtilen metinle bir metin kutusu denetimi çizer.

DrawTextBox(Graphics, Rectangle, String, Font, Rectangle, TextBoxState)

Belirtilen durumda ve sınırlarda ve belirtilen metin ve metin sınırlarıyla bir metin kutusu denetimi çizer.

DrawTextBox(Graphics, Rectangle, String, Font, TextFormatFlags, TextBoxState)

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

DrawTextBox(Graphics, Rectangle, String, Font, Rectangle, TextFormatFlags, TextBoxState)

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

DrawTextBox(Graphics, Rectangle, TextBoxState)

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

public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.TextBoxState state);
static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.TextBoxState -> unit
Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, state As TextBoxState)

Parametreler

g
Graphics

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

bounds
Rectangle

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

state
TextBoxState

TextBoxState Metin kutusunun görsel durumunu belirten değerlerden biri.

Özel durumlar

İşletim sistemi görsel stilleri desteklemez.

-veya-

Görsel stiller, işletim sistemindeki kullanıcı tarafından devre dışı bırakılır.

-veya-

Görsel stiller uygulama pencerelerinin istemci alanına uygulanmaz.

Açıklamalar

Bu yöntemi çağırmadan önce özelliğinin IsSupported döndürdüğünü truedoğrulamanız gerekir.

Şunlara uygulanır

DrawTextBox(Graphics, Rectangle, String, Font, TextBoxState)

Belirtilen durumda ve sınırlarda ve belirtilen metinle bir metin kutusu denetimi çizer.

public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ textBoxText, System::Drawing::Font ^ font, System::Windows::Forms::VisualStyles::TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string textBoxText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? textBoxText, System.Drawing.Font? font, System.Windows.Forms.VisualStyles.TextBoxState state);
static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.VisualStyles.TextBoxState -> unit
Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, textBoxText As String, font As Font, state As TextBoxState)

Parametreler

g
Graphics

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

bounds
Rectangle

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

textBoxText
String

String Metin kutusuna çizecek olan.

font
Font

Font için uygulanacak textBoxText.

state
TextBoxState

TextBoxState Metin kutusunun görsel durumunu belirten değerlerden biri.

Özel durumlar

İşletim sistemi görsel stilleri desteklemez.

-veya-

Görsel stiller, işletim sistemindeki kullanıcı tarafından devre dışı bırakılır.

-veya-

Görsel stiller uygulama pencerelerinin istemci alanına uygulanmaz.

Açıklamalar

Bu yöntemi çağırmadan önce özelliğinin IsSupported döndürdüğünü truedoğrulamanız gerekir.

Şunlara uygulanır

DrawTextBox(Graphics, Rectangle, String, Font, Rectangle, TextBoxState)

Belirtilen durumda ve sınırlarda ve belirtilen metin ve metin sınırlarıyla bir metin kutusu denetimi çizer.

public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ textBoxText, System::Drawing::Font ^ font, System::Drawing::Rectangle textBounds, System::Windows::Forms::VisualStyles::TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string textBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.VisualStyles.TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? textBoxText, System.Drawing.Font? font, System.Drawing.Rectangle textBounds, System.Windows.Forms.VisualStyles.TextBoxState state);
static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.TextBoxState -> unit
Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, textBoxText As String, font As Font, textBounds As Rectangle, state As TextBoxState)

Parametreler

g
Graphics

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

bounds
Rectangle

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

textBoxText
String

String Metin kutusuna çizecek olan.

font
Font

Font için uygulanacak textBoxText.

textBounds
Rectangle

sınırlarını Rectangle belirten değeridir textBoxText.

state
TextBoxState

TextBoxState Metin kutusunun görsel durumunu belirten değerlerden biri.

Özel durumlar

İşletim sistemi görsel stilleri desteklemez.

-veya-

Görsel stiller, işletim sistemindeki kullanıcı tarafından devre dışı bırakılır.

-veya-

Görsel stiller uygulama pencerelerinin istemci alanına uygulanmaz.

Açıklamalar

Bu yöntemi çağırmadan önce özelliğinin IsSupported döndürdüğünü truedoğrulamanız gerekir.

Şunlara uygulanır

DrawTextBox(Graphics, Rectangle, String, Font, TextFormatFlags, TextBoxState)

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

public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ textBoxText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string textBoxText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? textBoxText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.TextBoxState state);
static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.TextBoxState -> unit
Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, textBoxText As String, font As Font, flags As TextFormatFlags, state As TextBoxState)

Parametreler

g
Graphics

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

bounds
Rectangle

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

textBoxText
String

String Metin kutusuna çizecek olan.

font
Font

Font için uygulanacak textBoxText.

flags
TextFormatFlags

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

state
TextBoxState

TextBoxState Metin kutusunun görsel durumunu belirten değerlerden biri.

Özel durumlar

İşletim sistemi görsel stilleri desteklemez.

-veya-

Görsel stiller, işletim sistemindeki kullanıcı tarafından devre dışı bırakılır.

-veya-

Görsel stiller uygulama pencerelerinin istemci alanına uygulanmaz.

Açıklamalar

Bu yöntemi çağırmadan önce özelliğinin IsSupported döndürdüğünü truedoğrulamanız gerekir.

Şunlara uygulanır

DrawTextBox(Graphics, Rectangle, String, Font, Rectangle, TextFormatFlags, TextBoxState)

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

public:
 static void DrawTextBox(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ textBoxText, System::Drawing::Font ^ font, System::Drawing::Rectangle textBounds, System::Windows::Forms::TextFormatFlags flags, System::Windows::Forms::VisualStyles::TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string textBoxText, System.Drawing.Font font, System.Drawing.Rectangle textBounds, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.TextBoxState state);
public static void DrawTextBox (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? textBoxText, System.Drawing.Font? font, System.Drawing.Rectangle textBounds, System.Windows.Forms.TextFormatFlags flags, System.Windows.Forms.VisualStyles.TextBoxState state);
static member DrawTextBox : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Rectangle * System.Windows.Forms.TextFormatFlags * System.Windows.Forms.VisualStyles.TextBoxState -> unit
Public Shared Sub DrawTextBox (g As Graphics, bounds As Rectangle, textBoxText As String, font As Font, textBounds As Rectangle, flags As TextFormatFlags, state As TextBoxState)

Parametreler

g
Graphics

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

bounds
Rectangle

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

textBoxText
String

String Metin kutusuna çizecek olan.

font
Font

Font için uygulanacak textBoxText.

textBounds
Rectangle

sınırlarını Rectangle belirten değeridir textBoxText.

flags
TextFormatFlags

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

state
TextBoxState

TextBoxState Metin kutusunun görsel durumunu belirten değerlerden biri.

Özel durumlar

İşletim sistemi görsel stilleri desteklemez.

-veya-

Görsel stiller, işletim sistemindeki kullanıcı tarafından devre dışı bırakılır.

-veya-

Görsel stiller uygulama pencerelerinin istemci alanına uygulanmaz.

Örnekler

Aşağıdaki kod örneği, bir metin kutusu çizmek için özel denetimin DrawTextBox(Graphics, Rectangle, String, Font, Rectangle, TextFormatFlags, TextBoxState) OnPaint yönteminde yönteminin nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için TextBoxRenderer sağlanan daha büyük bir örneğin parçasıdır.

    // Use DrawText with the current TextFormatFlags.

protected:
    virtual void OnPaint(PaintEventArgs^ e) override
    {
        __super::OnPaint(e);

        if (TextBoxRenderer::IsSupported)
        {
            TextBoxRenderer::DrawTextBox(e->Graphics, textBorder, this->Text,
                this->Font, textRectangle, textFlags, TextBoxState::Normal);

            this->Parent->Text = "CustomTextBox Enabled";
        }
        else
        {
            this->Parent->Text = "CustomTextBox Disabled";
        }
    }
// Use DrawText with the current TextFormatFlags.
protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);

    if (TextBoxRenderer.IsSupported)
    {
        TextBoxRenderer.DrawTextBox(e.Graphics, textBorder, this.Text,
            this.Font, textRectangle, textFlags, TextBoxState.Normal);

        this.Parent.Text = "CustomTextBox Enabled";
    }
    else
    {
        this.Parent.Text = "CustomTextBox Disabled";
    }
}
' Use DrawText with the current TextFormatFlags.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    MyBase.OnPaint(e)

    If TextBoxRenderer.IsSupported Then
        TextBoxRenderer.DrawTextBox(e.Graphics, textBorder, Me.Text, _
            Me.Font, textRectangle, textFlags, TextBoxState.Normal)
        Me.Parent.Text = "CustomTextBox Enabled"
    Else
        Me.Parent.Text = "CustomTextBox Disabled"
    End If
End Sub

Açıklamalar

Bu yöntemi çağırmadan önce özelliğinin IsSupported döndürdüğünü truedoğrulamanız gerekir.

Şunlara uygulanır