Olvasás angol nyelven Szerkesztés

Megosztás a következőn keresztül:


DataGridViewRow.MinimumHeight Property

Definition

Gets or sets the minimum height of the row.

[System.ComponentModel.Browsable(false)]
public int MinimumHeight { get; set; }

Property Value

The minimum row height in pixels, ranging from 2 to Int32.MaxValue. The default is 3.

Attributes

Exceptions

When setting this property, the row is in a DataGridView control and is a shared row.

The specified value when setting this property is less than 2.

Examples

The following code example uses the MinimumHeight property to set the minimum height of the second row. This code example is part of a larger code example provided in How to: Manipulate Rows in the Windows Forms DataGridView Control.

// Set minimum height.
private void Button4_Click(object sender, System.EventArgs e)
{

    int secondRow = 1;
    DataGridViewRow row = dataGridView.Rows[secondRow];
    row.MinimumHeight = 40;
}

Remarks

The MinimumHeight property maintains the display of the row by setting a limit to how far the user can resize the row's height through the user interface (UI).

Applies to

Termék Verziók
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

See also