Working with Button
This recipe introduces the button component where it shows how to make use of the button in our application, how to have a different look-n-feel for it, and handle the user action.
Getting ready
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Create a new folder named ch06
in the same folder where we had created ch01
and ch02
folders. We will be using this new folder to keep the code.
How to do it...
Carry out the following steps:
- Create and open a new file named
ch06_01.js
and paste the following code in it:Ext.setup({ onReady: function() { var buttons = [ { text: 'Normal', handler: function() { Ext.Msg.alert('Info', 'You have clicked: ' + this.text); } }, { ui : 'round', ...
Get Sencha Touch Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.