Android Question How can I delete a panel?

funker

Member
Licensed User
Hello good day.

How can I delete a panel please ?

this Panel:
Private image1 As Panel
Private cvsGraph As Canvas

cvsGraph.DrawLine(225,225, 225+x,225+y, Colors.Green, 1.5)

Greeting.
 

rleiman

Well-Known Member
Licensed User
Longtime User
Hi funker,

If you created the panel using the designer, you can click on it to hightlight it. Next right click with the cursor on the panel and select the "Cut" item from the popup window. That will cut it out and now you can save your changes before closing the designer.

Note: If you delete the panel, all other views on that panel will also be deleted. If you want to delete the panel and keep all the views that were on the panel, I would drag them off the panel prior to deleting that panel and making sure the "Parent" property for them are on "Activity".

Hope this helps.
 
Upvote 0

funker

Member
Licensed User
Hello...
I draw in the program.
Then I would like to delete it and redraw it in the empty panal (cls or delete ...???)

cvsGraph.delete() or
cvsGraph.cls()

not funktion.

greeting
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
B4X:
cvsGraph.DrawColor(YourColor)
image1.Invalidate

Do you really want to draw with pure pixel values?
cvsGraph.DrawLine(225,225, 225+x,225+y, Colors.Green, 1.5)
You might use dip values:
cvsGraph.DrawLine(225dip, 225dip, 225dip + x, 225dip + y, Colors.Green, 1.5)
What do you expect with StrokeWidth = 1.5 ?

You might have a look at chapter 6 Graphics / Drawing in the B4A Beginner's Guide.
 
Last edited:
Upvote 0
Top