Extjs里面browserwindow 最大化窗口如何才能永久最大化

博客分类:
var win = new Ext.Window({
modal : true,
title : "Ext-Window",
maximizable : true,
monitorResize:true,
draggable:false, // 禁止移动
resizable : false,
maximizable:false, // 禁止最大化
layout : 'fit',
plain:true,
buttonAlign : 'right',
listeners:{
close:function(w){
w.container.removeClass("x-window-maximized-ct"); //显示滚动条
w.restore(); // 关闭窗口前先还原,滚动条才不会消失
maximize:function(w){
//最大化后需要将窗口重新定位,否则窗口会从最顶端开始最大化
w.setPosition (document.body.scrollLeft,document.body.scrollTop);
win.show();
win.container.addClass('x-window-maximized-ct'); // 隐藏浏览器滚动条
win.setPosition(0, 0);
win.fitContainer(); // 填充满浏览器
Ext.EventManager.onWindowResize(function(a,b){
var win = Ext.getCmp("window");
if(win == undefined){
win.setPosition(0, 0);
win.fitContainer();
开发者博客:
浏览: 207755 次
来自: 深圳
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'博客分类:
Ext.namespace("com.deng");
* Panel的子类-Window窗口
* Window是Panel的子类,Ext.Window = Ext.extend(Ext.Panel,{}),从源代码可以看出
* Window继承自Panel,意味着Window具体Panel的所有特征,并且具有自己的个性
* 从外观上来看Window对象更像Window操作系统中的窗口,有标题栏、关闭按钮,默认显示在页面最中间、能够拖到
* 改变窗口大小、自动激活选中窗口,Window必须使用show()方法才会显示出来,render方法和renderTo对它来说无用。
* Window有两种类型: 模式窗口和非模式窗口,默认为后者。模式窗口在窗口没有关闭之前无法对其它组件作任何操作,等
* 同于Ext.Msg.alert(),默认情况下,Window接受ESC按键,按下ESC按键,窗口会自动关闭
* 因为Ext.Window继承自Ext.Panel,所以很多用法非常类似,一个典型的Ext.Window对象包含标题栏、关闭按钮,这也是
* 默认行为
Ext.onReady(function(){
new Ext.Window({
title: "窗口",
width: 400,
height: 300
}).show(Ext.getBody());
* Window要通过show()方法才能显示,参数为动画参照物,窗口会从参照物上飞出,如果不指定参数,则没有动画效果
* Window是一个容器,可以通过下面三种方法往Window正文区域放置内容
* 1. 直接配置html属性
Ext.onReady(function(){
new Ext.Window({
title: "窗口",
width: 400,
height: 300,
html: "显示内容的窗口",
bodyStyle: "padding: 5px"
}).show(Ext.getBody());
* bodyStyle配置选项是Window正文区域的样式,填充间距被设置成5个像素,防止内容和窗口边框挨得太近
* 2.将另一个文件中的内容加载到Window中
Ext.onReady(function(){
new Ext.Window({
title: "窗口2",
width: 400,
height: 300,
bodyStyle: "padding: 5px",
autoLoad: {url: "inner.html",scripts:true}
}).show(Ext.getBody());
dengyulong
浏览: 222183 次
来自: 湖南
怎么调用啊?
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
前端(html(html5),css(less,css3,css sprite),js(angularJS,extjs,jquery))交流
克克群号: 4
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(2379)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'Extjs Window里包含FormPanel关闭再打开时报错 终级解决方法,不容易啊!',
blogAbstract:'看了好多帖子算是解决了。
注意一:首先不能用close()方法关闭window,要用hide().但是窗口(window)默认带个个关闭图标\'X\',这个默认是执行close()方法的,故设置window的closeAction: \'hide\'& 就可以了,注意的是这里的Action里的A要大写。
注意二:关闭再打开的时候,不用new了,只需要show()出来就可以了。当然要判断,如:
if(!win2){&&&&&&&win2 = new NewActionWindow();}',
blogTag:'extjs,formpanel,window,关闭,win2',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:9,
publishTime:4,
permalink:'blog/static/',
commentCount:0,
mainCommentCount:0,
recommendCount:3,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'前端(html(html5),css(less,css3,css sprite),js(angularJS,extjs,jquery))交流\r\n克克群号: 4 \r\n',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list} 上传我的文档
 下载
 收藏
该文档贡献者很忙,什么也没留下。
 下载此文档
正在努力加载中...
ExtJS的窗口
下载积分:30
内容提示:ExtJS的窗口
文档格式:PDF|
浏览次数:162|
上传日期: 00:47:18|
文档星级:
全文阅读已结束,如果下载本文需要使用
 30 积分
下载此文档
该用户还上传了这些文档
ExtJS的窗口
关注微信公众号博客分类:
一、如何让ExtJS的弹出提示信息框Ext.MessageBox或者创建的Ext.Window显示在最前面:
下面是显示一个Window的JS代码:
var formPanel = MisTab1.createAddFormPanel();
var addWin = new Ext.Window({
title: "添加产品类别",
pageX: 50,
pageY: 50,
width: 600,
height: 200,
plain: true,
resizable: false,
collapsible: true,
closeAction: 'close',
closable: true,
modal: 'true',
buttonAlign: "center",
bodyStyle: "padding:20px 0 0 0",
alwaysOnTop: true,
items: [formPanel],
buttons: [{
text: "添 加",
minWidth: 70,
handler: function() {
text: "关 闭",
minWidth: 70,
handler: function() {
addWin.show();
效果如图:
想要让Window显示在最前面,只要创建一个WindowGroup管理创建的Window即可,需要添加的代码如下:
var tab1GroupMgr = new Ext.WindowGroup();
//前置窗口
tab1GroupMgr.zseed=99999;
var addWin = new Ext.Window({
title: "添加产品类别",
pageX: 50,
pageY: 50,
width: 600,
height: 200,
plain: true,
manager: tab1GroupMgr,
二、ExtJS弹出提示信息框Ext.MessageBox或者创建的Ext.Window被Ext.TabPanel覆盖的解决方法
出现这种原因可能是因为TabPanel设置了floating:true配置项。
floating : Boolean True表示为浮动此面板(带有自动填充和投影的绝对定位),false... True表示为浮动此面板(带有自动填充和投影的绝对定位),false表示为在其渲染的位置"就近"显示(默认为false)。True to float this Panel (absolute position it with automatic shimming and shadow), false to display it inline where it is rendered (defaults to false).
解决方法就是把设置的floationg:true配置项去掉:
var tabPanel = new Ext.TabPanel({
region: 'center',
activeTab:0,
shadow: true,
floating: true,
//去掉该配置项
title: '欢迎页面'
除了文章中有特别说明,均为IT宅原创文章,转载请以链接形式注明出处。 本文链接:
浏览: 61572 次
来自: 苏州
推荐使用http://buttoncssgenerator.c ...
我也遇到了,烦人
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'}

我要回帖

更多关于 window.open 最大化 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信