DataGridColumnStyle.Alignment DataGridColumnStyle.Alignment DataGridColumnStyle.Alignment DataGridColumnStyle.Alignment Property


열의 텍스트 맞춤을 가져오거나 설정합니다.Gets or sets the alignment of text in a column.

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

속성 값

HorizontalAlignment 값 중 하나입니다.One of the HorizontalAlignment values. 기본값은 Left입니다.The default is Left. 올바른 옵션에는 Left, CenterRight가 있습니다.Valid options include Left, Center, and Right.


다음 코드 예제에서는 합니다 Alignment 의 각 열에 대 한 속성을 System.Windows.Forms.DataGridHorizontalAlignment.Center 데이터 문자열이 아닌 경우.The following code example sets the Alignment property for each column in a System.Windows.Forms.DataGrid to HorizontalAlignment.Center if the data isn't a string.

Private Sub SetAlign()
   Dim myColumnStyle As DataGridColumnStyle 
   For each myColumnStyle In dataGrid1.TableStyles("Customers"). _
      myColumnStyle.Alignment = HorizontalAlignment.Center
End Sub

적용 대상