Well,
I hate myself when i fall/fail to the "same" errors...
But I have to say that same things at same language are many (i think for compatibility) - so i want to refresh old apps and some brain-ideas not working with new XUI B4X things :-( - or what...
So for example i have one circle at one b4xview and i want to copy to 15 new !! and this time need to do that at programmatically/runtime not at layout / using loadlayout..
my code:
Thinking that all good ?
but nope... something going wrong... only one showing - moving - i think the last...
why ?
1) How i will copy to 15 new pieces ---> blackpieces ???
+and a 2nd question too: ' blackpieces(i).left=200 ' hey this not works too... why ? - and must use setlayoutanimated to move views...
ps1: As I am thinking - I wonder this - is it real possible to create b4xview on runtime... is it ok with xui.createpanel ... or addview is better.... (2 more questions...)
ps2: ...why am i refreshing my apps ? ?
I hate myself when i fall/fail to the "same" errors...
But I have to say that same things at same language are many (i think for compatibility) - so i want to refresh old apps and some brain-ideas not working with new XUI B4X things :-( - or what...
So for example i have one circle at one b4xview and i want to copy to 15 new !! and this time need to do that at programmatically/runtime not at layout / using loadlayout..
my code:
B4X:
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private xui As XUI
Private piece As B4XView
Dim b4xc As B4XCanvas
Dim blackpieces(15) As B4XView
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("Layout1")
MainForm.Show
b4xc.Initialize(piece)
b4xc.DrawCircle(20,20,15,xui.Color_Black,True,1)
For i=0 To 14
blackpieces(i)=xui.CreatePanel("")
blackpieces(i)=piece
blackpieces(i).BringToFront
' blackpieces(i).left=200 ' hey this not works too... why ?
blackpieces(i).SetLayoutAnimated(200,Rnd(50,900),Rnd(50,600),40,40)
Next
End Sub
Thinking that all good ?
but nope... something going wrong... only one showing - moving - i think the last...
why ?
1) How i will copy to 15 new pieces ---> blackpieces ???
+and a 2nd question too: ' blackpieces(i).left=200 ' hey this not works too... why ? - and must use setlayoutanimated to move views...
ps1: As I am thinking - I wonder this - is it real possible to create b4xview on runtime... is it ok with xui.createpanel ... or addview is better.... (2 more questions...)
ps2: ...why am i refreshing my apps ? ?