Code : Tout sélectionner
Dim mots.s(5)
mots(0) = "zero"
mots(1) = "un"
mots(2) = "deux"
mots(3) = "trois"
mots(4) = "quatre"
If OpenWindow(1, 0, 0, 200, 80, "DrawText Bug")
Repeat
Event = WaitWindowEvent()
If Event = #PB_Event_Repaint And StartDrawing( WindowOutput(1) )
DrawingMode(#PB_2DDrawing_Transparent)
x = 10
For i = 0 To 4
x = DrawText(x, 10, mots(i)) ;exemple tout bête
Next i
mots(3) = "" ;avec une chaine nulle ca ne fonctionne plus
x = 10
For i = 0 To 4
x = DrawText(x, 30, mots(i))
Next i
;résultat attendu
x = 10
For i = 0 To 4
DrawText(x, 50, mots(i))
x + TextWidth(mots(i))
Next i
mots(3) = "trois " ;rétabli la situation de départ
StopDrawing()
EndIf
Until Event = #PB_Event_CloseWindow
EndIf
