Help Center

RowHeightMinproperty

Windowspropertydoc-orphan
No implementation located. This member is documented, but the source scan found no matching declaration. It is likely declared in a header this scan does not resolve, or provided by a macro.

Syntax

PROPERTY RowHeightMin () AS LONG
PROPERTY RowHeightMin (BYVAL rHeightMin AS LONG)
Also documented as RowHeight — one description covers them all.

Parameters

NameDescription
IndexThe zero-based index of the row to size, or -1 to set all rows at once.
rHeightThe height of the row, measured in twips (1/1440th of an inch).
rHeightMinThe height of the row, measured in twips (1/1440th of an inch).

Description

Returns or sets the height of the specified row, in twips.

Remarks

Setting the height to 0 effectively hides the row from the user's view.

Setting the height to -1 for a specific row index resets that row to the default height based on the control's current font.

If the AllowUserResizing property is enabled, users can manually change the RowHeight at runtime by dragging row headers.

The MSHFlexGrid does not automatically expand RowHeight to fit wrapped text. If you enable WordWrap, you must manually calculate and set a larger RowHeight to see the multiple lines of text.

In hierarchical displays, you can use the RowHeightMin property to set a minimum height across all rows in a specific band.

When resizing a large number of rows in a loop, always set Redraw = False before the loop and Redraw = True after to prevent visual stuttering.

When set to a non-zero value, it prevents any individual row from becoming shorter than this limit, even if the content or user resizing would otherwise reduce it further.

Unlike the RowHeight property, which can target individual rows, RowHeightMin applies a consistent minimum threshold across the entire grid.

It is particularly useful when using small fonts or when the AllowUserResizing property is enabled, ensuring that users do not accidentally hide row content by resizing it too small.

If a conflict exists between an individual row's RowHeight and the global RowHeightMin, the RowHeightMin value takes precedence to ensure the minimum height is maintained.

Examples

' Set the header row (index 0) to be taller grid.RowHeight(0) = 450

' Set all data rows to a standard height grid.RowHeight(-1) = 300

' Hide the second row (index 1) grid.RowHeight(1) = 0

' Prevents any row from being shorter than 300 twips grid.RowHeightMin = 300

Reference