#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private cv As B4XCanvas
Private pn As B4XView
Private sv As ScrollPane
Private xui As XUI
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets, "dark.css"))
pn=xui.CreatePanel("")
sv.Initialize("")
sv.InnerNode = pn
MainForm.RootPane.AddNode(sv,0,0,600,600)
pn.Width=4096
pn.Height=600*2
cv.Initialize(pn)
iniGriglia
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 iniGriglia As Boolean
Dim x0,y0,x1,y1
x0=0
y0=0
x1=0
y1=pn.Height
For i=0 To pn.Width
cv.DrawLine(x0,y0,x1,y1,xui.Color_DarkGray,0.5)
x0 = x0+10
x1=x0
Next
x0=0
y0=0
x1=pn.Width
y1=0
For i=0 To pn.Height
cv.DrawLine(x0,y0,x1,y1,xui.Color_DarkGray,0.5)
y0 = y0+10
y1=y0
Next
Return True
End Sub