VSFlexGrid Control > VSFlexGrid Properties, Events, and Methods > VSFlexGrid Properties > ColWidthMax Property |
Returns or sets the maximum column width, in twips.
[form!]VSFlexGrid.ColWidthMax[ = value As Long ]
Set this property to a non-zero value to set a maximum limit to column widths. Set it to zero to remove the maximum limit on column widths. Use the ColWidthMin property to set a minimum limit to column widths.
Setting limits on column widths may be useful in conjunction with the AutoSize method to prevent extremely long entries from making columns too wide or empty columns from becoming too narrow.
This example sets the maximum column width to 2 inches (2880 twips):
fg.ColWidthMax = 2880
Long