CheckBox.AutoCheck 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
클릭할 때 Checked 값과 CheckState'의 모양이 자동으로 변경되는지 여부를 CheckBoxCheckBox 나타내는 값을 가져오거나 설정합니다.
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
속성 값
true
Checked 이벤트에서 컨트롤의 값이나 CheckState 값 및 모양이 자동으로 변경 Click 되면 이고, false그렇지 않으면 . 기본값은 true입니다.
예제
다음 코드 예제에서는 토글 단추를 만들고 초기화 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
설명
false로 설정된 경우 AutoCheck 이벤트 처리기의 값을 Checked 업데이트 CheckStateClick 하는 코드를 추가해야 합니다.