1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| Dim DX As Integer, DY As Integer
Dim jmfY, jmfrg As Integer
Private Sub Form_Activate()
MSFlexGrid1.ColWidth(0) = 2000
MSFlexGrid1.Rows = 5
MSFlexGrid1.FixedCols = 1
MSFlexGrid1.FixedCols = 1
MSFlexGrid1.Height = 735
MSFlexGrid1.TextMatrix(0, 0) = "voilà ma première ligne"
MSFlexGrid1.TextMatrix(1, 0) = "voilà ma deuxième ligne"
MSFlexGrid1.TextMatrix(2, 0) = "et cà c'est ma troisième ligne"
MSFlexGrid1.TextMatrix(3, 0) = "voyez ma quatrième ligne"
MSFlexGrid1.TextMatrix(4, 0) = "j'en suis à la cinqième"
End Sub
Private Sub MSFlexGrid1_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
MSFlexGrid1.ToolTipText = MSFlexGrid1.TextMatrix(MSFlexGrid1.MouseRow, MSFlexGrid1.MouseCol)
End Sub
Private Sub MSFlexGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
GoTo 10
jmfY = Int(y / MSFlexGrid1.RowHeight(1))
jmfrg = jmfY + (MSFlexGrid1.TopRow) - 1
On Error Resume Next
MSFlexGrid1.ToolTipText = MSFlexGrid1.TextMatrix(jmfrg, 0)
Err.Clear
10:
MSFlexGrid1.ToolTipText = MSFlexGrid1.TextMatrix(MSFlexGrid1.MouseRow, MSFlexGrid1.MouseCol)
End Sub
Private Sub MSFlexGrid1_Scroll()
jmfrg = jmfY + (MSFlexGrid1.TopRow) '- 1
MSFlexGrid1.ToolTipText = MSFlexGrid1.TextMatrix(jmfrg, 0) |
Partager