TextBox 생성자

정의

TextBox 클래스의 새 인스턴스를 초기화합니다.

public:
 TextBox();
public TextBox ();
Public Sub New ()

예제

다음 코드 예제에서는 컨트롤의 새 인스턴스를 TextBox 만들고 컨트롤의 Text 속성에 문자열을 할당합니다.

public:
   void CreateMyTextBoxControl()
   {
      // Create a new TextBox control using this constructor.
      TextBox^ textBox1 = gcnew TextBox;
      // Assign a string of text to the new TextBox control.
      textBox1->Text = "Hello World!";
      // Code goes here to add the control to the form's control collection.
   }
public void CreateMyTextBoxControl()
 {
    // Create a new TextBox control using this constructor.
    TextBox textBox1 = new TextBox();
    // Assign a string of text to the new TextBox control.
    textBox1.Text = "Hello World!";
    // Code goes here to add the control to the form's control collection.
 }
Public Sub CreateMyTextBoxControl()
    ' Create a new TextBox control using this constructor.
    Dim textBox1 As New TextBox()
    ' Assign a string of text to the new TextBox control.
    textBox1.Text = "Hello World!"

    ' Code goes here to add the control to the form's control collection.
End Sub

설명

부모 컨테이너 컨트롤은 의 색 및 글꼴 설정을 TextBox정의합니다.

적용 대상