Me.Push(0).FontBold = False
Me.Push(1).FontBold = False
Me.Push(2).FontBold = False
Me.Push(3).FontBold = False
Me.Push(4).FontBold = False
Me.Push(Index).FontBold = True
End Sub
Private Sub Push_Mousedown(Index As Integer, Button As Integer, Shift As Integer, x As Single, y As Single)
Me.Push(0).FontBold = False
Me.Push(1).FontBold = False
Me.Push(2).FontBold = False
Me.Push(3).FontBold = False
Me.Push(4).FontBold = False
Me.Push(Index).FontBold = True
End Sub
End Sub<hr />
Private Sub PlacePush(idx As String, MnuListTop As Integer, P1 As Integer, P2 As Integer, P3 As Integer, P4 As Integer)
MenuList.Top = MnuListTop
Push(1).Top = P1
Push(2).Top = P2
Push(3).Top = P3
Push(4).Top = P4
Call Me.Controls("Frame" & idx).ZOrder(0)
End Sub<hr />
Private Sub Push_Click(Index As Integer)
Dim i As Integer
With MenuList
Select Case Index
Case 0: Call PlacePush(vbNullString, 375, .Height, .Height + 375, .Height + 750, .Height + 1125)
Case 1: Call PlacePush(CStr(Index), 375, 375, .Height + 375, .Height + 750, .Height + 1125)
Case 2: Call PlacePush(CStr(Index), 750, 375, 750, .Height + 750, .Height + 1125)
Case 3: Call PlacePush(CStr(Index), 750, 375, 750, 1125, .Height + 1125)
Case 4: Call PlacePush(CStr(Index), 1500, 375, 750, 1125, 1450)
End Select
End With
Mis à part le fait que tu sembles avoir fait une erreur avec Push(4) ... sinon Push(4) couvrirait Pussh(3) ... Push(4) devrait être 1400 , non ?
Tu sembles avoir un groupe de Push indexés de 0 à 4 et n'en modifier que la propriété Left, en l'incrémentant de 375.
Ce qui pourrait donc s'écrire en utilisant une boucle For I ... to... et la variable I