AppInventor: Tutorial Membuat Tombol dan Bereaksi
Jump to navigation
Jump to search
Sumber: http://www.appinventor.org/content/CourseInABox/Intro/EventNugget
Example 1. How do you turn a button red when the user clicks it? example 2
OK, this is a really silly app but it will get us started. The app appears and there is a gray button. When the user touches (clicks) the button, the button's color changes to red. The click of the button, Button1.Click, is an event, something that can happen to the app. The gold when Button1.Click block is called an event-handler. The blocks inside it are the response to the event. set means to change something, in this case, change the button’s BackgroundColor to red. The blocks, as a whole, specify that when the user clicks the button it should turn red.