Here is a minimal example of my problem. I wish to draw on a canvas of a panel, erase the drawing, and redraw it. The following code does not show the redrawing. Can someone show me how I should do this?
Dim Pnl As Panel
Dim Cnv As Canvas
Dim Pth As Path
Dim Wipe As Label
Pnl.Initialize("") 'init staff panel
Pnl.Color=Colors.Red
Activity.AddView(Pnl,0,0,40%x,40%y)
Cnv.Initialize(Pnl) 'init canvas for drawing on it
Pth.Initialize(5%x,15%y) 'draw a line segment
Pth.LineTo(15%x,15%y)
Cnv.drawPath(Pth,Colors.Yellow,False,1)
Activity.Invalidate
Msgbox("","Drawn?")
Wipe.Initialize("") 'remove the line segment
Wipe.Color=Colors.Red
Pnl.AddView(Wipe,5%x,14%y,15%x,16%y)
Msgbox("","Removed?")
Pth.Initialize(5%x,15%y) 'redraw the line segment
Pth.LineTo(15%x,15%y)
Cnv.drawPath(Pth,Colors.Yellow,False,1)
Activity.Invalidate
Msgbox("","Redrawn?")