The following compiles ok but if I don't comment out the for/next loop then the app crashes as soon as the line marked is executed.
B4X:
Dim lbl1 as label
Dim lbl2 as label
Dim lblArray() As Label
lblArray = Array As Label(lbl1, lbl2)
Dim ii As int
For ii = 0 to 1
lblArray(ii).Width = Panel6.Width/5 '<----crash here (tried initializing panel 6 first)
Next
[code/]
Can someone tell me how I should do it please.
Also, how should I mark a section in my post as code? (obviously I'm doing it wrong because these last lines are not supposed to be part of the code.