Sencha-touch-layout-hbox

提供:Dev Guides
移動先:案内検索

Sencha Touch-レイアウトhBox

説明

*hbox* -このレイアウトでは、要素を水平方向に分散できます。

構文

以下は、hboxレイアウトを使用する簡単な構文です。

 layout: 'hbox'

以下は、hBoxレイアウトの使用法を示す簡単な例です。

<!DOCTYPE html>
<html>
   <head>
      <link href = "https://cdn.sencha.com/touch/sencha-touch-2.4.2/resources/css/sencha-touch.css" rel = "stylesheet"/>
      <script type = "text/javascript" src = "https://cdn.sencha.com/touch/sencha-touch-2.4.2/sencha-touch-all.js"></script>
      <script type = "text/javascript">
         Ext.application({
            name: 'Sencha',
            launch: function() {
               Ext.create('Ext.Container', {
                  fullscreen: true, layout: 'hbox', items: [
                     {
                        xtype: 'panel', html: 'message list', flex: 1
                     },
                     {
                        xtype: 'panel', html: 'message preview', flex: 2
                     }
                  ]
               });
            }
         });
      </script>
   </head>
</html>

これにより、次の結果が生成されます–