Page 99 - Modular_V1.1_Flipbook
P. 99
Change the display name of button
To change the display name, follow the given steps:
Step 1 Click on the button in the View pane.
Step 7 Type a new name for button in the Text box.
Adding a Text to Speech Component
From the Palette Pane, open Media drawer and click
and drag TextToSpeech component to View Pane.
This component will not appear in the View pane because it will drop under Non-visible
components that will show up on the app’s user interface. You can still find it in Component
pane and Properties pane.
Block Editor
This is the place where we code the components added in the Design Window and instruct
them the actions to be performed by them. Following are the main parts of the Block Editor:
Blocks Button Built-in Blocks: It contains all the
predefined blocks in the application. They
are responsible for handling operations
like Math, Text, Logic and Control.
Component Blocks: It contains relevant
Backpack
Built-in blocks for the components we have added
Blocks
in the Design window.
Workspace
Components Workspace: It arranges all the blocks for
Blocks coding in the workspace.
Trash Trash: It is used for deleting blocks.
Backpack: It stores the copy of all the
blocks even when we exit App Inventor.
Making click event for button
Step 1 Click on button Talking_Me.
Step 2 Drag and drop When Talking_Me.Click do
block, and drag and drop it to workspace.
This is an Event Handler block that will handle what
happens when the button on your app is clicked.
Program the TextToSpeech Action
Step 1 Click on TextToSpeech block.
Step 2 Click and hold the call TextToSpeech1.
Speak block.
Step 3 Drag it over to the Workspace add drop
it over the button click block.
This block will execute when the button on our app is clicked and make our phone speak.
App Development 97

