Extjs-layout-column

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

Ext.js-列レイアウト

このレイアウトは、コンテナ内の複数の列を表示するためのものです。 固定幅またはパーセント幅を列に定義できます。 パーセント幅は、コンテナのフルサイズに基づいて計算されます。

構文

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

layout: 'column'

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

<!DOCTYPE html>
<html>
   <head>
      <link href = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-classic/resources/theme-classic-all.css"
         rel = "stylesheet"/>
      <script type = "text/javascript"
         src = "https://cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/ext-all.js"></script>

      <script type = "text/javascript">
         Ext.onReady(function() {
            Ext.create('Ext.panel.Panel', {
               renderTo : Ext.getBody(),
               layout : 'column' ,
               xtype: 'layout-column',
               requires: ['Ext.layout.container.Column'],
               width : 600,

               items: [{
                  title : 'First Component width 30%',
                  html : 'This is First Component',
                  columnWidth : 0.30
               },{
                  title : 'Second Component width 40%',
                  html : '<p> This is Second Component </p> <p> Next line for second component </p>',
                  columnWidth : 0.40
               },{
                  title : 'Third Component width 30%',
                  html : 'This is Third Component' ,
                  columnWidth : 0.30
               }]
            });
         });
      </script>
   </head>

   <body>
   </body>
</html>

上記のプログラムは、次の結果を生成します-