---
title: "extjs 动态设置元素宽度和高度"
author: "chenlin10058"
date: "2013-06-18T09:21:07Z"
tags: []
categories: ["Web前端"]
slug: "extjs"
draft: false
lastmod: "2013-06-18T09:21:07Z"
id: 1888502
url: "https://chenlin10058.iteye.com/blog/1888502"
---

//当窗口改变大小时动态修改grid宽度和高度 类似于window.resize  
Ext.EventManager.onWindowResize(function(width ,he ight){   
 var h = Ext.fly('left\_tools').getHeight()+Ext.fly('layout').getHeight(); 

})