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.
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.
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', text: 'Round' }, { ui : 'small', text: 'Small' } ]; var panel = new Ext.Panel({ fullscreen: true, layout:...