ComponentOne VSFlexGrid 8.0
BeforeUserResize Event

Fired before the user starts resizing a row or column, allows cancel.

Syntax

Private Sub VSFlexGrid_BeforeUserResize( ByVal Row As Long,  ByVal Col As Long, Cancel As Boolean)

Remarks

The user may resize rows and columns using the mouse, depending on the setting of the AllowUserResizing property.

If the user is about to start resizing a row, the Row parameter contains the index of the row to be resized and the Col parameter contains -1. If the user is about to start resizing a column, the Col parameter contains the index of the column to be resized and the Row parameter contains -1.

You may prevent the user from resizing specific rows and columns by setting the Cancel parameter to True.

For example, the code below prevents the user from resizing columns 0 and 1:

    Private Sub Form_Load()

        fg.AllowUserResizing = flexResizeColumns

    End Sub

   

    Private Sub fg_BeforeUserResize(ByVal Row As Long, ByVal Col As Long, Cancel As Boolean)

        If Col = 0 Or Col = 1 Then

            Cancel = True

        End If

    End Sub

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback