Procedure change text

Hello,

for each button i have the same blocks only changes the text. It's possible to create a procedure to apply for each button?

Hey, @Neusa_Simoes can you turn the blocks to English? You should always write everything in English so more people can help you. Then you can go right back to your other language. Also, what text are you trying to change? A label's text? A button's text? And if you can, can you provide me with the aia?

Lang

1 Like

yes, just write your own custom procedure and pass the value (in the example "Others") as parameter
http://ai2.appinventor.mit.edu/reference/blocks/procedures.html#do
see also the tutorials about How to write a procedure, see for example Chapter 21 of the book below...

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 do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Here is a sample app that uses 42 buttons, changing their text and color as needed.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.