Building wizards using CardLayout
This recipe describes how to use a card layout as a container layout. Card layout lays items in the form of (playing) cards and shows only one item at a time. We will implement a wizard application to understand the usage of this layout.
Getting ready
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
How to do it...
Carry out the following steps:
- Create and open a new file named
ch03_04.js
and paste the following code into it:Ext.setup({ onReady: function() { var navigate = function(panel, direction){ var layout = panel.getLayout(); layout[direction](); Ext.getCmp('move-prev').setDisabled(!layout.getPrev()); Ext.getCmp('move-next').setDisabled(!layout.getNext()); ...
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.