[英]How to make a Modal Window not movable?
我想要一個模態Window
但不能移動,並且無法在文檔中找到有關此行為的任何信息。 我該如何禁用它?
目前,您可以使用客戶端編程來自定義不可移動的模態(重疊,彈出)窗口,下面的示例創建兩個重疊窗口並使其中一個不可移動
<zk xmlns:w="client">
<window title="center win, movable" border="normal"
position="center,center"
onCreate="self.doOverlapped();" />
<window title="top win, not movable" border="normal"
sclass="z-window-not-movable"
position="center,top"
onCreate="self.doOverlapped();">
<attribute w:name="bind_"><![CDATA[
function (a, b, c) {
if (!this.$class.ignoremoveOverridden) {
this.$class.ignoremoveOverridden = true;
var oldImove = this.$class._ignoremove;
this.$class._ignoremove = function (dg, pointer, evt) {
var wgt = dg.control;
if (jq(wgt.$n()).hasClass('z-window-not-movable')) {
return true;
}
return oldImove.apply(wgt, arguments);
}
}
this.$bind_(a, b, c);
}
]]></attribute>
</window>
</zk>
參考文獻:
如果Window
沒有標題(沒有標題,關閉按鈕,......),則無法移動它。
如果你想要/需要head元素,我很確定沒有構建方式
禁用運動。 但我也對此感興趣,我認為應該這樣做
被添加到zk跟蹤器作為功能。
我將更詳細地看一下Window
組件,如果我找到方法的話
要禁用它,我會添加它。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.