O'Reilly logo

Learning Ext JS 4 by Armando Gonzalez, Crysfel Villa

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

A simple button

Once we know how the Ext.util.Observable base class works and the methods that we can use, it's time to dig into the widgets. We're going to start with the buttons. In order to create a button we need to instantiate the Ext.button.Button class. This class manages all the ins and outs of a single button.

Let's create an HTML file and import the Ext library and instantiate the Button class as follows:

<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Button</title> <!-- Importing the Ext JS library --> <script type="text/javascript" src="../ext-4.1.1a-gpl/ext-all-dev.js"></script> <linkrel="stylesheet" href="../ext-4.1.1a-gpl/resources/css/ext-all.css" /> <script type="text/javascript"> ...

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