RadioButton.Appearance 속성

정의

RadioButton의 모양을 결정하는 값을 가져오거나 설정합니다.

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 값 중 하나가 아닌 경우

예제

다음 코드 예제에서는 만들기 및 초기화 RadioButton, 토글 컨트롤의 모양을 제공 하 고 해당 AutoCheck 속성을 설정 하 false고 추가 합니다 Form.

private void InitializeMyRadioButton()
{
   // Create and initialize a new RadioButton.
   RadioButton radioButton1 = new RadioButton();

   // Make the radio button control appear as a toggle button.
   radioButton1.Appearance = Appearance.Button;

   // Turn off the update of the display on the click of the control.
   radioButton1.AutoCheck = false;

   // Add the radio button to the form.
   Controls.Add(radioButton1);
}
Private Sub InitializeMyRadioButton()
    ' Create and initialize a new RadioButton. 
    Dim radioButton1 As New RadioButton()
       
    ' Make the radio button control appear as a toggle button.
    radioButton1.Appearance = Appearance.Button
       
    ' Turn off the update of the display on the click of the control.
    radioButton1.AutoCheck = False
       
    ' Add the radio button to the form.
    Controls.Add(radioButton1)
End Sub

설명

값이 Appearance 설정된 NormalRadioButton 경우 원형 확인란을 사용하여 컨트롤을 그립니다. 값이 설정 ButtonRadioButton 되면 위쪽 또는 아래쪽 상태로 전환할 수 있는 컨트롤로 그려집니다. 두 형식 모두 텍스트, 이미지 또는 둘 다를 표시할 수 있습니다.

적용 대상

추가 정보