RadioButton.CheckAlign 속성

정의

RadioButton 확인란 부분의 위치를 가져오거나 설정합니다.

public:
 property System::Drawing::ContentAlignment CheckAlign { System::Drawing::ContentAlignment get(); void set(System::Drawing::ContentAlignment value); };
[System.ComponentModel.Bindable(true)]
public System.Drawing.ContentAlignment CheckAlign { get; set; }
public System.Drawing.ContentAlignment CheckAlign { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.CheckAlign : System.Drawing.ContentAlignment with get, set
member this.CheckAlign : System.Drawing.ContentAlignment with get, set
Public Property CheckAlign As ContentAlignment

속성 값

ContentAlignment

유효한 ContentAlignment 값 중 하나입니다. 기본값은 MiddleLeft입니다.

특성

예외

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

예제

다음 코드 예제에서는 런타임에 CheckAlign 속성을 변경할 수 있는 방법을 보여 줍니다. 값이 변경되면 텍스트의 RadioButton 확인란 부분이 텍스트 Checked 의 오른쪽 또는 왼쪽으로 이동합니다. 이 예제에서는 폼에서 RadioButton 컨트롤을 인스턴스화하고 네임스페이스에 대한 참조를 System.Drawing 포함해야 합니다.

private:
   Void radioButton1_CheckedChanged( System::Object^ sender,
      System::EventArgs^ e )
   {
      // Change the check box position to be opposite its current position.
      if ( radioButton1->CheckAlign == ContentAlignment::MiddleLeft )
      {
         radioButton1->CheckAlign = ContentAlignment::MiddleRight;
      }
      else
      {
         radioButton1->CheckAlign = ContentAlignment::MiddleLeft;
      }
   }
private void radioButton1_CheckedChanged(Object sender, 
                                         EventArgs e)
{
   // Change the check box position to be opposite its current position.
   if (radioButton1.CheckAlign == ContentAlignment.MiddleLeft)
   {
      radioButton1.CheckAlign = ContentAlignment.MiddleRight;
   }
   else
   {
      radioButton1.CheckAlign = ContentAlignment.MiddleLeft;
   }
}
Private Sub radioButton1_CheckedChanged(sender As Object, e As EventArgs)
    ' Change the check box position to be opposite its current position.
    If radioButton1.CheckAlign = ContentAlignment.MiddleLeft Then
        radioButton1.CheckAlign = ContentAlignment.MiddleRight
    Else
        radioButton1.CheckAlign = ContentAlignment.MiddleLeft
    End If
End Sub

적용 대상