O'Reilly logo

Sencha Touch Cookbook - Second Edition by Ajit Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Working with the button component

This recipe introduces the button component and shows how to make use of the button in our applications, how to have a different look and feel, and handle user action.

Getting ready

Make sure you have set up your development environment by following the recipes outlined in Chapter 1, Gear Up for the Journey.

Create a new folder, ch06, in the www folder where we had created the ch01 and ch02 folders. We will be using this new folder in which the code will be kept.

How to do it...

Carry out the following steps:

  1. Create and open a new file named ch06_01.js and copy-paste the following code into it:
    Ext.application({ name : 'MyApp', launch: function() { var buttons = [ { text: 'Normal', handler: function() { Ext.Msg.alert('Info', ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required