-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
I would like to set the left property of an overlapped window, unfortunately I have some difficulties. I set the property, but the position of the window doesn´t change.
my index zul file:
<?page id="page_index" contentType="text/html;charset=UTF-8" ?>
<zk>
<window id="win_index" use="cIndex" title="mytitle" border="normal" height="100%" width="100%" >
<borderlayout id="indexborderlayout" >
<center>
<div id="indexdiv">
<!-- when clicking the button IncludePoint test.zul should be included HERE -->
<button id="IncludePoint" onClick="win_index.onClickButton()">
</div>
</center>
</borderlayout>
</window>
</zk>
the test.zul file
<window id="winXY" use="cOverlapped" title="windowtitle" mode="overlapped" closable="true" onClose="winXY.onClose()" >
</window>
The cOverlapped java class has the onCreate() method:
public void onCreate() {
this.setSizable(true);
this.setWidth("300px");
this.setHeight("400px");
this.setBorder("none");
this.setLeft("300px");
this.setTop("95px");
}
the onClickButton() method:
Div indexdiv = (Div) Path.getComponent("//page_index/win_index/indexdiv");
Include inc = new Include();
inc.setSrc("test.zul");
indexdiv.insertBefore(indexdiv.getFirstChild(), inc);
The window winXY should be included into win_index then.
I tried to enter different values for this.setLeft() but the position is always the same:
In Firefox the position at creation of the window is always the same but after creation I can move the window.
In IE the postion at creation of the window is always the same and I cannot even move the window. After moving it jumps back at the original position.
Is this a bug or do I miss something? I use zk package 3.6.0.
Thanks for your help!
ZK has no bug with setting the left property for the overlapped window. There was an onChangeEvent in my code, that set the left property of the overlapped window after creation.
I cannot reproduce the bug...
Here is my code both the zul & java file
The zul file
<window title="MainWindow"> <window id="winXY" use="org.zkoss.zk360.app.Overlapped" title="windowtitle" mode="overlapped" closable="true" > </window> </window>
The java file
package org.zkoss.zk360.app; import org.zkoss.zul.Window; public class Overlapped extends Window{ public void onCreate() { this.setSizable(true); this.setWidth("300px"); this.setHeight("400px"); this.setBorder("none"); this.setLeft("300px"); this.setTop("95px"); } }
could you provide further information... thx
Asked: 2009-04-04 23:57:33 +0800
Seen: 243 times
Last updated: Apr 06 '09