存学 |jquery例子|Flex例子|ASP例子|.net学习

Ext 点击grid 标题最大化至全屏grid

by SaveLearn on 一.29, 2010, under EXT

首先 Ext中grid的3个属性来确定可以点击标题栏.

collapsible:true,
//True表示为面板是可收缩的
titleCollapse:true,
//True表示为允许单击头部区域任何一个位置都可收缩面板(当collapsible = true)
hideCollapseTool:true
//True表示为不出 展开/收缩的轮换按钮,当collapsible = true,
//false就显示
之后用监听来确定点击了标题栏
listeners : {
beforecollapse : function(){
all2(document.getElementById(“grid-example”).className);
// 此处是我自己定义的函数,
//用来更改grid主体的div样式,
//控制div的position属性,来变成全屏显示.
return false;  //这样点击标题栏也不会收缩真个grid.
}
}
定义一个函数来更改grid的宽高,和主体div的样式.
function all2(name)
{
if (name==”all”)
{
document.getElementById(“grid-example”).className = “all2″;
grid.setSize({width:500, height:500});
}
else
{
document.getElementById(“grid-example”).className = “all”;
grid.setSize({width:document.body.clientWidth-10, height:500});
}
}
欢迎大家评论
请大家记住  本站地址 http://www.savelearn.com
:, , ,

1 Comment for this entry

  • Amy Turziano

    Heya¡­my very first comment on your site. ,I have been reading your blog for a while and thought I would completely pop in and drop a friendly note. . It is great stuff indeed. I also wanted to ask..is there a way to subscribe to your site via email?

Leave a Reply

想要寻找什么?

使用此处的搜索功能来寻找您需要的:

找不到您要寻找的东西? 请与我们取得联系,然后告诉我们您需要什么!

推荐链接

以下网址经常出现在存学网络...