开发者

Extjs 4 stretching of nested panel

I have a problem with resize of my page. I have a tree panel inside a div, nested inside a html-table. I don't use ext Container, cause I have complex UI-design which I can't realize with Ext. So I want my treepanel to resize by height when window is resized. Please, hel开发者_C百科p me.

Table markup:

  <table id="table_container">
  <tr>
      <td colspan="2" style="height: 30px; valign: top;">
           <div id="menu_div"></div>
      </td>
  </tr>
  <tr>
      <td colspan="2" style="height: 10px;">
           <div id="space_div"></div>
      </td>
  </tr>
  <tr>
      <td style="width:250px; height: 100%; padding-top: 70px;">
         <div id="tree_div" style="valign: top; height: 100%;"></div>
      </td>
      <td rowspan="2" style="padding: 10px;">
          <div id="main_content_div" style="valign: top;">
          </div>
      </td>
  </tr>

Tree code:

        var tree = Ext.create('Ext.tree.Panel', {
        id: 'tree_id',
        store: tree_store,
        width: 250,
        height: 500,
        autoScroll: true,
        renderTo: document.getElementById('tree_div'),
        useArrows: true,
        border: false,
        frame: false,
        rootVisible: true

});


use

autoHeight: true

instead of

height: 500


Try to use this: height: document.getElementById('tree_div').clientHeight for the Ext.tree.Panel. This is not the best variant, I think, but it worked for me.

Good luck!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜