0

setLeft overlapped window problem - bug???

asked 2009-04-04 23:57:33 +0800

etamas gravatar image etamas
78 2

updated 2009-04-05 04:04:37 +0800

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!

delete flag offensive retag edit

2 Replies

Sort by » oldest newest

answered 2009-04-05 11:10:10 +0800

etamas gravatar image etamas
78 2

updated 2009-04-05 11:11:28 +0800

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.

link publish delete flag offensive edit

answered 2009-04-06 01:18:17 +0800

kindalu gravatar image kindalu
255

updated 2009-04-06 01:18:42 +0800

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-04-04 23:57:33 +0800

Seen: 243 times

Last updated: Apr 06 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More