CheckBox.Appearance 속성

정의

CheckBox 컨트롤의 모양을 결정하는 값을 가져오거나 설정합니다.

public:
 property System::Windows::Forms::Appearance Appearance { System::Windows::Forms::Appearance get(); void set(System::Windows::Forms::Appearance value); };
public System.Windows.Forms.Appearance Appearance { get; set; }
member this.Appearance : System.Windows.Forms.Appearance with get, set
Public Property Appearance As Appearance

속성 값

Appearance

Appearance 값 중 하나입니다. 기본값은 Normal입니다.

예외

할당된 값이 Appearance 값 중 하나가 아닌 경우

예제

다음 코드 예제에서는 토글 단추를 만들고 초기화 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

설명

값이 설정된 NormalCheckBox 경우 Appearance 일반적인 모양이 있습니다. 값이 설정 ButtonCheckBox 되면 토글 단추처럼 나타나며, 이 단추는 위쪽 또는 아래쪽 상태로 전환될 수 있습니다.

적용 대상

추가 정보