I'm using a scrollview in B4A as a B4XView, then loading a new panel (created as a separate screen in the designer) into that scrollview. Works well.
Now in B4i, the same code crashes when I do the same thing:
svScn1.Top = 120dip
svScn1.Left = 0dip
svScn1.Width = 100%x
svScn1.Height = 100%y-50dip
svScn1.GetView(0).LoadLayout("Screen1Panel")
The top of the crash shows this...
Error occurred on line: 99 (B4XMainPage)
Expected: B4IPanelView, object type: UIScrollView
Stack Trace: (
I found examples on this forum of how to do this if I define the svScn1 as a ScrollView, and then I can load the panel into the scrollview with svScn1.Panel.LoadLayout("Screen1Panel"). But not as a B4XView. Any idea how to do this?
Thanks.