Hello friend, it does work well for the horizontal scrollbar, but it would still be missing for the Vertical scrollbar.
on the other hand you could help me with the code:
Select Case wMsg
Case WM_LBUTTONUP
RaiseEvent CellClick(.HitRow, .HitCol, vbLeftButton)
'''''''''''''''''''''''''''''''''''''''''''''''''
Me.HitTest X, y
'--- ORDENAR''''''''
'If .HitRow = 0 And .HitCol <> 0 Then
If .HitRow = 0 Then
Dim Row1 As Long, Row2 As Long
Dim Col1 As Long, Col2 As Long
Me.GetSelRange Row1, Col1, Row2, Col2
Me.RowID(Me.Row) = 1 ' Temporary identification
If (mlLastColumnOrder <> .HitCol) Or (mbOrdDesc) Then
'Me.Sort = FlexSortStringAscending ' = FlexSortStringNoCaseAscending
If Me.HitResult = FlexHitResultCell And Me.HitRow < Me.FixedRows And Me.HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
' If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
If LastColSort > -1 And LastColSort <> Me.HitCol Then Me.ColSort(LastColSort) = FlexSortNone
mlLastColumnOrder = Me.HitCol
Call FlexSetColSort(
Me.VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = False
Else
' Me.Sort = FlexSortStringDescending ' = FlexSortStringNoCaseDescending
If .HitResult = FlexHitResultCell And .HitRow < Me.FixedRows And .HitCol > Me.FixedCols - 1 Then
If (vbLeftButton) = vbLeftButton Then
Me.Sort = FlexSortNone
If LastColSort > -1 And LastColSort <> .HitCol Then Me.ColSort(LastColSort) = FlexSortNone
LastColSort = .HitCol
Call FlexSetColSort(
VBFlexGrid1, LastColSort, True)
Me.Cell(FlexCellSort, Me.FixedRows, LastColSort, Me.Rows - 1, LastColSort) = FlexSortUseColSort
Cancel = True
End If
End If
mbOrdDesc = True
End If
mlLastColumnOrder = .HitCol
Me.Row = Me.RowIndex(1)
Me.RowID(Me.RowIndex(1)) = 0 ' Remove temporary identification
Me.CellEnsureVisible
If Row1 <> Row2 Then Me.RowSel = IIf(Row1 < Me.Row, Row1, Row2)
If Col1 <> Col2 Then Me.ColSel = IIf(Col1 < Me.Col, Col1, Col2)
End If
'-------'FIN ORDENAR''''''''
''''
what I am looking for is that the ascending and descending order is within the control (ctl)
Attachment 182281