DataGridViewRow.MinimumHeight Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the minimum height of the row.
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
The minimum row height in pixels, ranging from 2 to Int32.MaxValue. The default is 3.
- Attributes
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.
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.
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
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).
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 |
.NET-visszajelzés
A(z) .NET egy nyílt forráskód projekt. Visszajelzés adásához válasszon egy hivatkozást: