My problem is I use a For loop for multiply Images but Image Controls don't display my images.
This is my loop :
B4X:
For i = 1 To 46
If i = 1 Then
AddImage("Form3","Kana1",0,0,30,30,"cStretchImage","kana/h_ka.png",220,220,220,True,True)
Else
AddImage("Form3","Kana" & i,(i-1)*30,(i-1)*30+5,30,30,"cStretchImage","kana/h_" & Kana(i) & ".png",220,220,220,True,True)
End If
Next
I've found if I do it the first Image Control display my image correctly, but I can't repeat this lines in the loop...
B4X:
For i = 1 To 46
If i = 1 Then
AddImage("Form3","Kana1",0,0,30,30,"cStretchImage","kana/h_ka.png",220,220,220,True,True)
Else
AddImage("Form3","Kana" & i,(i-1)*30,(i-1)*30+5,30,30,"cStretchImage","kana/h_" & Kana(i) & ".png",220,220,220,True,True)
End If
Next
Kana1.Mode = cStretchImage
Kana1.Image = "kana/h_ka.png"
For i = 1 To 46
If i = 1 Then
AddImage("Form3","Kana1",0,0,30,30)
Else
AddImage("Form3","Kana" & i,(i-1)*30,(i-1)*30+5,30,30)
End If
Next
For i = 1 To 46
Control("Kana" & i).Image = "kana/h_" & Kana(i) & ".png"
Control("Kana" & i).Mode = cStretchImage
Next