CheckBox 생성자

정의

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

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

예제

다음 코드 예제에서는 토글 단추를 만들고 초기화 CheckBox하고 토글 단추 AutoCheck 의 모양을 지정하고 설정하여 false에 추가 Form합니다.

public:
   void InstantiateMyCheckBox()
   {
      // Create and initialize a CheckBox.   
      CheckBox^ checkBox1 = gcnew CheckBox;
      
      // Make the check box control appear as a toggle button.
      checkBox1->Appearance = Appearance::Button;
      
      // Turn off the update of the display on the click of the control.
      checkBox1->AutoCheck = false;
      
      // Add the check box control to the form.
      this->Controls->Add( checkBox1 );
   }
public void InstantiateMyCheckBox()
 {
    // Create and initialize a CheckBox.   
    CheckBox checkBox1 = new CheckBox(); 
    
    // Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button;
 
    // Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = false;
 
    // Add the check box control to the form.
    Controls.Add(checkBox1);
 }
Public Sub InstantiateMyCheckBox()
    ' Create and initialize a CheckBox.   
    Dim checkBox1 As New CheckBox()
    
    ' Make the check box control appear as a toggle button.
    checkBox1.Appearance = Appearance.Button
    
    ' Turn off the update of the display on the click of the control.
    checkBox1.AutoCheck = False
    
    ' Add the check box control to the form.
    Controls.Add(checkBox1)
End Sub

설명

기본적으로 새 CheckBox 인스턴스화가 인스턴스화 AutoCheck 되면 , 로 설정 true되고, Checked 로 설정 false되고 Appearance , 로 설정 Normal됩니다.

적용 대상

추가 정보