CheckBox.AutoCheck 속성

정의

Checked를 클릭할 때 CheckState 또는 CheckBox 값과 CheckBox의 모양이 자동으로 변경되는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool AutoCheck { bool get(); void set(bool value); };
public bool AutoCheck { get; set; }
member this.AutoCheck : bool with get, set
Public Property AutoCheck As Boolean

속성 값

Checked 이벤트가 발생할 때 CheckState 값 또는 Click 값과 컨트롤의 모양이 자동으로 변경되면 true이고, 그렇지 않으면 false입니다. 기본값은 true입니다.

예제

다음 코드 예제에서는 를 만들고 초기화 CheckBox하여 토글 단추의 모양을 지정하고 를 로 설정하고 AutoCheckfalse에 추가합니다 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

설명

가 false로 설정된 경우 AutoCheck 이벤트 처리기의 또는 CheckState 값을 Click 업데이트 Checked 하는 코드를 추가해야 합니다.

적용 대상