Returns or sets whether the user is allowed to resize rows and columns with the mouse.
Syntax
[form!]VSFlexGrid.AllowUserResizing[ = AllowUserResizeSettings ]
Remarks
Valid settings for the AllowUserResizing property are:
Constant |
Value |
Description |
flexResizeNone |
0 |
The user may not resize rows or columns. |
flexResizeColumns |
1 |
The user may resize column widths. |
flexResizeRows |
2 |
The user may resize row heights. |
flexResizeBoth |
3 |
The user may resize column widths and row heights. |
flexResizeBothUniform |
4 |
The user may resize column widths and row heights. When a row height is resized, the new height is applied to all rows. |
To resize rows or columns, the mouse must be over the fixed area of the control, and close to a border between rows or columns. The mouse pointer will then change into a sizing pointer and the user can drag the row or column to change the row height or column width.
A group of columns is selected (from first to last row) and the user resizes one of them, all selected columns are resized. The same applies to rows. To allow users to select entire rows and columns, set the AllowBigSelection property to True.
If column sizing is allowed and the AutoSizeMouse property is set to True, users may double-click the resizing area to resize a column so it will automatically fit the longest entry.
Rows with zero height and columns with zero width cannot be resized by the user. If you want to make them very small but still resizable, set their height or width to one pixel, not to zero. For example:
fa.ColWidth(5) = Screen.TwipsPerPixelX
The BeforeUserResize event is fired before resizing starts, and may be used to prevent resizing of specific rows and columns. The AfterUserResize event is fired after resizing, and may be used to validate the user's action.
Data Type
AllowUserResizeSettings (Enumeration)
Default Value
flexResizeNone (0)