DataGridViewRow.MinimumHeight 속성

정의

행의 최소 높이를 가져오거나 설정합니다.

public:
 property int MinimumHeight { int get(); void set(int value); };
[System.ComponentModel.Browsable(false)]
public int MinimumHeight { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.MinimumHeight : int with get, set
Public Property MinimumHeight As Integer

속성 값

2에서 Int32.MaxValue까지의 최소 행 높이(픽셀)입니다. 기본값은 3입니다.

특성

예외

이 속성을 설정할 때 행이 DataGridView 컨트롤 안에 있고 공유 행인 경우

이 속성을 설정할 때 지정된 값이 2보다 작은 경우

예제

다음 코드 예제에서는 속성을 사용하여 MinimumHeight 두 번째 행의 최소 높이를 설정합니다. 이 코드 예제는 방법: Windows Forms DataGridView 컨트롤의 행 조작에 제공된 더 큰 코드 예제의 일부입니다.

// Set minimum height.
void Button4_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
   int secondRow = 1;
   DataGridViewRow^ row = dataGridView->Rows[ secondRow ];
   row->MinimumHeight = 40;
}
// Set minimum height.
private void Button4_Click(object sender, System.EventArgs e)
{

    int secondRow = 1;
    DataGridViewRow row = dataGridView.Rows[secondRow];
    row.MinimumHeight = 40;
}
' Set minimum height.
Private Sub Button4_Click(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles Button4.Click

    Dim secondRow As Integer = 1
    Dim row As DataGridViewRow = dataGridView.Rows(secondRow)
    row.MinimumHeight = 40
End Sub

설명

속성은 MinimumHeight 사용자가 UI(사용자 인터페이스)를 통해 행 높이의 크기를 조정할 수 있는 범위로 제한을 설정하여 행의 표시를 유지합니다.

적용 대상

추가 정보