Sub Class_Globals
Private RootPanel As B4XView
Private ScrollViewPanel As B4XView
Private xui As XUI
Private B4XComboBox1 As B4XComboBox
Private Scrollview As ScrollView
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
RootPanel = Root1
End Sub
Private Sub B4XPage_Appear()
RootPanel.RemoveAllViews
#if b4a
Scrollview.Initialize(100%x)
#End If
#if b4i
Scrollview.Initialize("", 100%x, 100%y)
#End If
RootPanel.AddView(Scrollview, 0, 0, 100%x, 100%y)
ScrollViewPanel = Scrollview.Panel
'adding the layout to the scrollview panel (is what I need)
'positioning works in B4a, NOT in B4i
ScrollViewPanel.LoadLayout("MainPage")
'adding the layout to the main panel (test only, because I do need the scrollview)
'positioning works in B4A and B4i
'RootPanel.LoadLayout("MainPage")
B4XComboBox1.mBase.Left = 50dip
B4XComboBox1.mBase.Top = 100dip
Dim oList As List
oList.Initialize
oList.Add("aaa")
oList.Add("bbb")
oList.Add("ccc")
B4XComboBox1.SetItems(oList)
End Sub