#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#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("Main") 'Load the layout file.
MainForm.Show
AppInit
End Sub
'Return true to allow the default exceptions handler to handle the uncaught exception.
Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
Return True
End Sub
Sub AppInit
Dim ScrollPane1 As ScrollPane
ScrollPane1.Initialize("ScrollPane1")
MainForm.RootPane.AddNode(ScrollPane1,50,200,300,150)
ScrollPane1.SetVScrollVisibility("NEVER")
ScrollPane1.SetHScrollVisibility("ALWAYS")
Dim n As Pane
n.Initialize("n")
ScrollPane1.InnerNode = n
ScrollPane1.InnerNode.SetSize(2000,150)
For i = 0 To 100
Dim cvs As Canvas
cvs.Initialize("cvs")
cvs.Height = 150
cvs.Width = 20
cvs.DrawRect(0,0,20,i,fx.Colors.Cyan,True,0)
n.AddNode(cvs,i*20,0,20,150)
Next
n.PrefWidth = (i*20) + 20'Adjust the height of the innernode pane
End Sub