rooridge
Messages postés28Date d'inscriptionmardi 13 avril 2004StatutMembreDernière intervention14 juillet 2006
-
12 janv. 2005 à 13:42
rooridge
Messages postés28Date d'inscriptionmardi 13 avril 2004StatutMembreDernière intervention14 juillet 2006
-
13 janv. 2005 à 07:59
Salut TLM,
g un bug avec le composant MSHFLEXGRID. Voila en fait la première colonne doit permettre à l'utilisateur de faire la sélection d'un ligne (une flèche verte apparait alors pour indiquer la sélection). Or de temps en temps pour sélectionner la bonne ligne il faut cliquer sur la ligne du dessous. Le pb vient de l'évenement MouseDown dont voici le code :
------------------------------
Private Sub MSHFlexGridRecap_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
'
Dim i As Integer, bAll As Boolean
'
MSHFlexGridRecap.Row = MSHFlexGridRecap.MouseRow
MSHFlexGridRecap.col = MSHFlexGridRecap.MouseCol
'
If MSHFlexGridRecap.MouseCol <> 0 Then Exit Sub
MSHFlexGridRecap.Redraw = False
'On sélectionne tout
If MSHFlexGridRecap.MouseRow = 0 Then
MSHFlexGridRecap.col = 0
MSHFlexGridRecap.Row = 1
TextPoidsEnCours.Text = 0
If MSHFlexGridRecap.CellPicture <> 0 Then
bAll = True
Else
bAll = False
End If
'
For i = MSHFlexGridRecap.FixedRows To MSHFlexGridRecap.Rows - 1
MSHFlexGridRecap.Row = i
MSHFlexGridRecap.col = 0
If bAll Then
Set MSHFlexGridRecap.CellPicture = Nothing
Else
Set MSHFlexGridRecap.CellPicture = ImgValid.Picture
TextPoidsEnCours.Text = ModuleGlob.ConvertDotToComa(TextPoidsEnCours.Text) + ModuleGlob.ConvertDotToComa(Trim(MSHFlexGridRecap.TextArray(ModuleGlob.FGi(MSHFlexGridRecap, i, 9))))
End If
MSHFlexGridRecap.CellPictureAlignment = flexAlignCenterCenter
Next i
MSHFlexGridRecap.Redraw = True
Exit Sub
End If
'Si la sélection est différente de la précédente
If MSHFlexGridRecap.CellPicture = 0 Then
Set MSHFlexGridRecap.CellPicture = ImgValid.Picture
MSHFlexGridRecap.CellPictureAlignment = flexAlignCenterCenter
MSHFlexGridRecap.Redraw = True
'
'Sinon la sélection est la même que la précédente
Else
Set MSHFlexGridRecap.CellPicture = Nothing
TextPoidsEnCours.Text = ModuleGlob.ConvertDotToComa(TextPoidsEnCours.Text) - ModuleGlob.ConvertDotToComa(Trim(MSHFlexGridRecap.TextArray(ModuleGlob.FGi(MSHFlexGridRecap, MSHFlexGridRecap.Row, 9))))
MSHFlexGridRecap.Redraw = True
End If
'
End Sub
------------------------------
rooridge
Messages postés28Date d'inscriptionmardi 13 avril 2004StatutMembreDernière intervention14 juillet 20061 13 janv. 2005 à 07:59
Ben la par exemple, ca déconne sur mon poste (avant c'était juste sur un poste utilisateur).
Pour répondre à ta question ca bug tout le temps. G fait un screenshot qui montre le problème : voir ci dessous.
Merci de ton aide,