I couldn't put scrollview into scrollview? How i can do? Thanks
B4XMainPage
Page 2
I added sample code here.
B4XMainPage
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Dim p2x As P2
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)
Root = Root1
Root.LoadLayout("MainPage")
p2x.Initialize
B4XPages.AddPage("Page 2", p2x)
Dim SV As ScrollView
SV.Initialize(1230dip)
SV.Panel.LoadLayout("p2")
Root.AddView(SV, 0, 0, Root.Width, Root.Height)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
B4XPages.ShowPageAndRemovePreviousPages("Page 2")
End Sub
Page 2
B4X:
Sub Class_Globals
Private Root As B4XView 'ignore
Private xui As XUI 'ignore
Private Panel1 As Panel
Private scrollview1 As ScrollView
Private Label1 As Label
End Sub
'You can add more parameters here.
Public Sub Initialize As Object
Return Me
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
'load the layout to Root
Root.LoadLayout("P2")
Label1.initialize(Me)
scrollview1.panel.addview(Label1,10dip,10dip,63%x,100%y)
'Panel1.AddView(scrollview1, 0,0,scrollview1.Width, scrollview1.Height)
Label1.text="lorem ipsum dolor sit amet, consectetur adipiscing elit. " _
& "sed id tempus libero. phasellus tempor ullamcorper feugiat. sed vitae vulputate mauris, vitae efficitur erat. mauris dolor nisi, efficitur sollicitudin tristique id, interdum tempus quam. aliquam eleifend ligula id odio consequat mollis. orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. maecenas viverra orci at hendrerit aliquet. proin sollicitudin erat eu dictum tincidunt." _
& "etiam vulputate egestas libero, ut mattis turpis semper vel. donec lacus nisl, sollicitudin eu congue et, iaculis a sapien. aliquam tristique ullamcorper mi, at malesuada massa finibus non. maecenas id dapibus arcu. in venenatis et eros non bibendum. fusce non lacus sed erat interdum placerat. vivamus tristique orci at lectus feugiat viverra.morbi porta viverra vestibulum. sed congue congue mi, id convallis ex tempor at. proin fermentum semper libero, at ullamcorper lectus consectetur nec. sed id magna erat. nullam in lectus viverra purus rhoncus iaculis nec ultrices tellus. sed eu turpis pellentesque, accumsan ligula non, pharetra libero. vivamus sed quam enim. proin vehicula arcu sit amet malesuada fermentum. cras id dolor non ligula malesuada dapibus. interdum et malesuada fames ac ante ipsum primis in faucibus. curabitur a arcu a urna dapibus tincidunt non id mauris."
End Sub
I added sample code here.
Attachments
Last edited: