Hi all, I`m trying to add button array (in code) to a panel in a SD_XUIScrollView2D, if I don`t 'LoadLayout' the panel, I can't add the buttons. But the panel is scrollable, if I 'LoadLayout' i can then add the buttons, etc but it doesn't scroll.
Would appreciate pointers to what I`m missing here? I have attached my sample app.
Ok, great thanks...let me have a look. I see my problem I was trying to add the buttons to the panel, rather than the to scrollview.
Thank you StarDust
You add the hall_layout panel inside the scrollView by loading it with LoadLayout, but you don't change the size of the scrollView's internal panel.
Also it is not necessary to load a panel with the LoadLayout, I did not understand what happens to you if you add buttons with AddView instead
I removed the LoadLayout and inserted panels, no problem
B4X:
''xScrollView1.LoadLayout("layout2")
For i= 1 To 10
Dim P As B4XView = xui.CreatePanel("")
P.Color=xui.Color_Red
xScrollView1.AddView(P,i*35dip,10dip,30dip,30dip)
Next
Ok, great thanks...let me have a look. I see my problem I was trying to add the buttons to the panel, rather than the to scrollview.
Thank you StarDust