#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 400
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
'MainForm.RootPane.LoadLayout("Layout1") 'Load the layout file.
MainForm.Show
Dim l,t,w,h As Float
Dim ap As ScrollPane
ap.Initialize("ap")
ap.PrefHeight = MainForm.Height
ap.PrefWidth = MainForm.Width/2
ap.SetHScrollVisibility("ALWAYS")
ap.SetVScrollVisibility("ALWAYS")
Dim pn As Pane = ap.InnerNode
pn.Style = cssIphoneToolsBar
MainForm.RootPane.AddNode(pn, 0, 0, MainForm.Width/2, MainForm.Height)
l = 10
t = 10
w = (MainForm.Width/2)-20
h = Rnd(32,50)
For i = 0 To 100
Dim pna As Button
pna.Initialize("pn")
pna.Text = "button " & i
pn.AddNode(pna,l,t,w,h)
t = t + h + 10
h = Rnd(100,200)
Next
pn.PrefHeight = t + h + 10
ap.Pannable = True
End Sub
Sub cssIphoneToolsBar As String
Dim s As String = "-fx-background-color: linear-gradient(#98a8bd 0%, #8195af 25%, #6d86a4 100%);"
Return s
End Sub