Arranging your items horizontally using HBoxLayout

The HBox layout arranges items horizontally across a container. It optionally divides the available horizontal space between child items containing a flex configuration, which is numeric. The flex option is a ratio that distributes the width after any items with explicit widths have been accounted for. We can either use the width property to specify a fixed width or use flex. This recipe describes how we can arrange our items using the hbox 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:

  1. Create and open a new file named ch03_07.js and paste the following code into it:
    Ext.setup({ ...

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.