dhtmlxWindows使用方法

控制于视图内
w1.keepInViewport(true);

标题栏文本
win.setText(text);
 
窗体大小
dhxWins.window(id).setDimension(wh);
var dim = dhxWins.window(id).getDimension()document.getElementById("res").innerHTML = w + " dimension is (" + dim[0] + "" + dim[1] + ")";
 
窗体位置
dhxWins.window(id).setPosition(wh);
var pos = dhxWins.window(id).getPosition()document.getElementById("res").innerHTML = w + " position is (" + pos[0] + "" + pos[1] + ")";
 
显示/隐藏窗体
hxWins.window(id).show();
dhxWins.window(id).hide();
alert(dhxWins.window(id).isHidden());
 
启用/禁用拖动大小
dhxWins.window(id).allowResize();
dhxWins.window(id).denyResize();
alert(dhxWins.window(id).isResizable());
 
启用/禁用拖动位置
dhxWins.window(id).allowMove();
dhxWins.window(id).denyMove();
alert(dhxWins.window(id).isMovable());
 
启用/禁用最小化
dhxWins.window(id).allowPark();
dhxWins.window(id).denyPark();
alert(dhxWins.window(id).isParkable());
 
Progress
...
 
居中
dhxWins.window(getId()).center();
dhxWins.window(getId()).centerOnScreen();
 
显示/隐藏标题栏
w2.showHeader();
w2.hideHeader();
 
启用/禁用拖放效果
efName: move,resize.
dhxWins.setEffect(efNametrue);
dhxWins.setEffect(efNamefalse);
alert(dhxWins.getEffect(efName));
 
锁定
dhxWins.window(id).stick();
dhxWins.window(id).unstick();
alert(dhxWins.window(id).isSticked());
 
遮罩层
dhxWins.window(id).setModal(true);
alert(dhxWins.window(id).isModal());
alert(dhxWins.window(id).isModal());
 
顶层显示
dhxWins.window(id).bringToTop();
alert(dhxWins.window(id).isOnTop());
dhxWins.window(id).bringToBottom();
alert(dhxWins.window(id).isOnBottom());
 
全局事件
dhxWins.attachEvent("onResizeFinish"doOnResizeFinish)
dhxWins.attachEvent("onMoveFinish"doOnMoveFinish)
dhxWins.attachEvent("onFocus"doOnFocus);
 
个体事件
w2.attachEvent("onFocus"doOnFocusWin2);
 
URL事件
dhxWins.attachEvent("onContentLoaded"function() { alert("onContentLoaded event fired.")});
w1.attachURL("../common/attach_url_ajax_inner.html"true);
 
按钮操作
btn:  help,stick,sticked,park,minmax1,minmax2,close.
w1.button(btn[0]).show();
w1.button(btn[0]).hide();
alert(w1.button(btn[0]).isHidden());
w1.button(btn[0]).enable();
w1.button(btn[0]).disable();
alert(w1.button(btn[0]).isEnabled());
 
按钮事件
dhxWins.window("w1").attachEvent("onHelp"function() { alert("button \"Help\" was clicked")})w1.button("park").attachEvent("onClick"function() {alert("button \"Park\" was clicked")});
 
自定义按钮
 
 

 

你可能感兴趣的:(windows)