public Sub Initialize(p As Panel)
End Sub
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
cvs.Initialize(Panel1)
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Sub Panel1_Touch (Action As Int, X As Float, Y As Float)
If Action = Panel1.TOUCH_ACTION_DOWN Then
' px = X
' py = Y
px=WdsG2.leftcenter(0)
py=WdsG2.topcenter(0)
else If Action=Panel1.TOUCH_ACTION_UP Then
' cvs.DrawLine(px, py, X, Y, xui.Color_Transparent, 10dip)
' cvs.DrawCircle(px, py,30dip, xui.Color_Red,False, 4dip)
cvs.ClearRect(cvs.TargetRect)
cvs.Invalidate
cvs.Release
Root.RemoveAllViews
For i=0 To 1
WdsG2.SaveAnswer(i)=""
WdsG2.savePnumber(i)=-1
WdsG2.answerCount=0
Next
else if Action=Panel1.TOUCH_ACTION_MOVE Then
saveX=x
cvs.ClearRect(cvs.TargetRect)
cvs.DrawLine(px, py, X, Y, xui.Color_Red, 4dip)
cvs.Invalidate
checkline
Else
End If
End Sub