Canvas : save all points?

Hello
is there a way to get all points in the canvas as list?

image

As you add a point probably using DrawPoint( x , y ) (which draws a point at the given coordinates on the canvas) add those point coordinates to a List; then save the list of coordinates.

See Canvas

Thank you, but how i can add all those points to a list?i don't know how i get them all

What you do depends on how you added those points to the Canvas.

Without seeing an image of what you did to create the doodle:
Use a List Block like this (http://ai2.appinventor.mit.edu/reference/blocks/images/lists/additems.png) additemstolist immediately following your DrawPoint Block and set the item to the coordinates. You will get all the coordinates added to the List. Then you need to do something with the List you created; you can print it out in a Label, save it to a TinyDB for later recall etc.

Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.

There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.

Learn about components http://ai2.appinventor.mit.edu/reference/components/

and visit the Library http://appinventor.mit.edu/explore/library Help>Library on the MENU

1 Like

Thank you for your help, i got it, now how i can clear the list?


this video also very helpful

Thanks , i use this method to clear list

image

You can just use this:

lists_create_with

yes i used it, or do you mean to clear the list?

to clear the list

How can i use it when i click button?

1 Like

Thank you , that's much better and easier