|
-
Nov 4th, 2021, 07:04 PM
#11
Fanatic Member
Re: VBFlexGrid Control (Replacement of the MSFlexGrid control)
 Originally Posted by Krool
Update released. Included the ComboCueRow/ComboCueCol property which lets you determine where to display the combo cue.
It's possible to reset the ComboCueRow/ComboCueCol to -1 so that it is always the current focused cell. (equal .Row/.Col)
To have this "hot-tracking" behavior. Ensure VBFlexGrid.MouseTrack is True and have following code.
Code:
Private Sub VBFlexGrid1_MouseLeave()
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Sub
Private Sub VBFlexGrid1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
VBFlexGrid1.HitTest X, Y
If VBFlexGrid1.HitResult = FlexHitResultNoWhere Then
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
Exit Sub
End If
If VBFlexGrid1.HitRow >= VBFlexGrid1.FixedRows Then
Select Case VBFlexGrid1.HitCol
Case COL_CALENDARVALIDATION, COL_COMBODROPDOWN, COL_COMBOEDITABLE
VBFlexGrid1.ComboCue = FlexComboCueDropDown
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case COL_COMBOBUTTON
VBFlexGrid1.ComboCue = FlexComboCueButton
VBFlexGrid1.ComboCueRow = VBFlexGrid1.HitRow
VBFlexGrid1.ComboCueCol = VBFlexGrid1.HitCol
Case Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End Select
Else
VBFlexGrid1.ComboCue = FlexComboCueNone
VBFlexGrid1.ComboCueRow = -1
VBFlexGrid1.ComboCueCol = -1
End If
End Sub
After picking a dropdown ComboBox item, focus goes to mouse Cell, should stay at last dropdown cell, logically.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|