code_vb_source
Messages postés44Date d'inscriptionmercredi 28 mars 2007StatutMembreDernière intervention31 mars 2011
-
3 avril 2010 à 11:57
code_vb_source
Messages postés44Date d'inscriptionmercredi 28 mars 2007StatutMembreDernière intervention31 mars 2011
-
3 avril 2010 à 12:06
Je veux parcourir mon tableau MSHFLEXGRID par les flèches haut et bas et colorer à chaque fois la ligne sélectionner, donc ja'i fais ce code :
Private Sub MSHFLEXGRID1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode 38 Or KeyCode 40 Then
For i = 0 To Grid.Cols - 1
Grid.col = i
Grid.CellBackColor = &HC0FEE6
Next
Grid.col = 7
End If
End Sub
Mais ca ne marche toujours pas.
Quand je fais le parcours de mon tableau avec un point d'arrêt le programme n'execute même pas la procédure MSHFLEXGRID1_KeyDown
code_vb_source
Messages postés44Date d'inscriptionmercredi 28 mars 2007StatutMembreDernière intervention31 mars 2011 3 avril 2010 à 12:06
Désolé, plutôt je viens de noter cette procédure :
Private Sub MSHFLEXGRID1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode 38 Or KeyCode 40 Then
For i = 0 To MSHFLEXGRID1.Cols - 1
MSHFLEXGRID1.col = i
MSHFLEXGRID1.CellBackColor = &HC0FEE6
Next
MSHFLEXGRID1.col = 7
End If
End Sub