Add a new DividerDblClick event

Summary

Id: 11.11
Type: Issue Issue
Current Status: Open

Detail

6 Feb 2003 Open Alfonso Susavila

This event is very usefull when one needs to cancel the autoresize of a column that would occur after double-clicking the divider.

Declarations:

 Public Event DividerDblClick(ByVal lCol As Long, ByRef bCancel As Boolean)
 

Following is the complete code of Private Sub m_cHeader_DividerDblClick:

         Private Sub m_cHeader_DividerDblClick(lColumn As Long)
        Dim iCCol As Long
        Dim iCol As Long
        'ADDED BY ALFONSO SUSAVILA 25/09/2002 - NEW EVENT DividerDblClick
        Dim bCancel As Boolean
 
           CancelEdit
   
               ' Autosize column here
           For iCol = 1 To m_iCols
              If (m_tCols(iCol).lHeadercolIndex = lColumn + 1) Then
                 iCCol = m_tCols(iCol).lCellColIndex
                 Exit For
              End If
           Next iCol
   
        'ADDED BY ALFONSO SUSAVILA 25/09/2002 - NEW EVENT DividerDblClick
        RaiseEvent DividerDblClick(iCCol, bCancel)
        'CHANGED BY ALFONSO SUSAVILA 25/09/2002 - NEW EVENT DividerDblClick
        If Not bCancel Then AutoWidthColumn iCCol
        'AutoWidthColumn iCCol
   
        End Sub