0

Window bottom border not properly aligned

asked 2011-06-07 06:58:26 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

When I create a new Window, the bottom border sometimes looks like this: http://dl.dropbox.com/u/17844821/zeug/window_bottom_border_bug.png
See the strange light grey border at the very bottom?

After resizing the window, this problem vanished and doesn't reappear again until I reload the application next time.

What's going on here?

delete flag offensive retag edit

16 Replies

Sort by ยป oldest newest

answered 2011-06-14 03:31:07 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Can you provide sample code, zk version, browser version? Thanks.

link publish delete flag offensive edit

answered 2011-06-20 08:33:41 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

Hey and thanks for your reply
I use ZK 5.0.7 and Google Chrome 12. Same problem seems also to occur on Firefox.

I use the following code to create my window through a macro component:

	private Mailformular createMailformular(Component parent) {
		Mailformular mailformular = new Mailformular();
		mailformular.setMacroURI("/WEB-INF/macros/client/mailformular/mailformular.zul"); //$NON-NLS-1$
		mailformular.afterCompose();
		if (parent != null) {
			mailformular.setParent(parent);
		} else {
			mailformular.setParent(div_root);
		}

		return mailformular;
	}

And the macro looks like this:

mailformular.zul

<?component name="attachmentlistbox" macroURI="../attachmentlistbox/attachmentlistbox.zul" class="com.smampi.web.view.client.previewpanel.previewbox.attachmentlistbox.Attachmentlistbox"?>

<window id="wdw_mailformular" sclass="wdw_mailformular" width="40%" height="65%" maximizable="true"
		closable="true" border="normal" sizable="true" mode="overlapped" position="center">

	<!-- Styles -->
	<style src="/css/mailformular.css"/>

	<toolbar height="52px">
		<toolbarbutton id="tbtn_mailformular_send" image="/gfx/32x32/mail_send.gif" orient="vertical"  />
	</toolbar>

	<div id="scroll_parent" width="100%" vflex="1" style="overflow: auto;">

		<grid width="100%" vflex="min" sclass="grid_mailformular">
			<columns width="100%">
				<column width="90px" sclass="noborder" align="right" />
				<column width="100%" align="left" />
			</columns>
			<rows>
				<!-- To -->
				<row sclass="noborder">
					<label id="lbl_mailformular_to" />
					<textbox id="tb_mailformular_to" hflex="1" focus="true" />
				</row>
				
				<!-- CC -->
				<row sclass="noborder">
					<label id="lbl_mailformular_cc" />
					<textbox id="tb_mailformular_cc" hflex="1" />
				</row>
				
				<!-- BCC -->
				<row sclass="noborder">
					<label id="lbl_mailformular_bcc" />
					<textbox id="tb_mailformular_bcc" hflex="1" />
				</row>
				
				<!-- Subject -->
				<row sclass="noborder">
					<label id="lbl_mailformular_subject" />
					<textbox id="tb_mailformular_subject" hflex="1" />
				</row>
				
				<!-- From -->
				<row sclass="noborder" align="left">
					<label id="lbl_mailformular_from" />
					<combobox id="cbobox_mailformular_outgoingservers" width="200px" autodrop="true" readonly="true" />
				</row>
			</rows>
		</grid>
		
		<borderlayout hflex="true" vflex="true">
			<center>
				<div hflex="true" vflex="true">
					<textbox id="tb_mailformular_body" hflex="true" vflex="true" multiline="true" />
				</div>
			</center>
			<east id="bl_east_mailformular_upload" width="25%" collapsible="true" open="true" visible="true" splittable="true">
				<attachmentlistbox id="attachmentlistbox" style="display: block;" height="100%" vflex="true" downloadable="true" cutable="true" copyable="true" deleteable="true" renameable="true" uploadable="true" pasteable="true" dropable="true" />
			</east>
		</borderlayout>
	
	</div>
	
</window>

Important: If the problem occured once and I close the window and then open a new window again (using createMailFormular()) the problem is gone.

link publish delete flag offensive edit

answered 2011-06-26 22:23:49 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Valmar, can you post this to ZK bugs so we can track it? Thanks.

link publish delete flag offensive edit
link publish delete flag offensive edit

answered 2011-06-27 21:43:19 +0800

SimonPai gravatar image SimonPai
1696 1

Hi valmar,

From the test case you provided I haven't yet reproduced the issue. Maybe it's because I don't have the custom CSS and the other macro component.
Could you provide more information, or nail down the scenario a bit more?

When you refresh the page, does the issue occur again?

Regards,
Simon

link publish delete flag offensive edit

answered 2011-06-28 08:01:29 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

Hi Simon and thanks for your reply.

I have a button which I use to create the window.
In the ON_CLICK event listener of that button, I call

createMailformular(this);

Then the window pops up with the mentioned problem.

THEN, I close the window and click the button again.
The window looks perfectly. No problems any more.

Resizing the window using the mouse pointer also fixes the issue.

I already tried calling .invalidate() on the window and its parent components but that didn't fix it :-(

link publish delete flag offensive edit

answered 2011-06-28 10:53:23 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Have a try with calling .invalidate(); before you call doModal();

link publish delete flag offensive edit

answered 2011-06-28 15:00:09 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

That's interesting.
Calling doModal() really fixed the issue but it gives me a modal window (which I don't want).

link publish delete flag offensive edit

answered 2011-07-06 17:51:57 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

updated 2011-07-06 17:55:55 +0800

I was able to fix this!

I first called

window.doOverlapped()
and then:
Component parent = aLabelInTheWindow;
while(parent != null){
 parent.invalidate();
 parent = parent.getParent();
}

That did the trick.

Thanks Stephan, you bumped me into the right direction :-)

Still... very weird behavior of that window..

link publish delete flag offensive edit

answered 2011-07-06 17:59:09 +0800

valmar gravatar image valmar
925 2 13
http://www.timo-ernst.net

Damn... I deleted my browser's cache and tried again.
Problem wasn't fixed and still remains :-(

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: 2011-06-07 06:58:26 +0800

Seen: 565 times

Last updated: Jul 25 '11

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