Hi to everybody,
I wrote this code (using a similar code from B4A that's working):
I designed a simple ScrollPane1 in main page and I create also a layout "PaneToBeScrolledLayout" containg a Pane with some random items. The PaneToBeScrolled is higher and wider than the ScrollPane1.
B4J hints me that it is not necessary to inizialize the scrollpane and the pane.
When I execute it, I get the mainpage with the ScrollPane1 with the PaneToBeScrolled and the random items.
The problem is that I've no chance to scroll it and no scrollbars are visible.
If I set the scrollbars always visible, I get the scrollbars with "length 1" (i.e. no chance to move them).
I'm sure that I'm making some mistake but I don't understand what.
I tried also to turn the declaration in B4XView
but is worse: the program doesn't start. I've found this discussion (https://www.b4x.com/android/forum/threads/b4xview-and-scrollpane-loadlayout.119586/#post-747985) but I don't understand the solution.
Thank you.
I wrote this code (using a similar code from B4A that's working):
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private ScrollPane1 As ScrollPane
Private PaneToBeScrolled As Pane
End Sub
Public Sub Initialize
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")
ScrollPane1.LoadLayout("PaneToBeScrolledLayout",-1,-1)
End Sub
I designed a simple ScrollPane1 in main page and I create also a layout "PaneToBeScrolledLayout" containg a Pane with some random items. The PaneToBeScrolled is higher and wider than the ScrollPane1.
B4J hints me that it is not necessary to inizialize the scrollpane and the pane.
When I execute it, I get the mainpage with the ScrollPane1 with the PaneToBeScrolled and the random items.
The problem is that I've no chance to scroll it and no scrollbars are visible.
If I set the scrollbars always visible, I get the scrollbars with "length 1" (i.e. no chance to move them).
I'm sure that I'm making some mistake but I don't understand what.
I tried also to turn the declaration in B4XView
B4X:
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
Private ScrollPane1 As B4XView
Private PaneToBeScrolled As B4XView
End Sub
Thank you.