0

window onMaximize, onRestore

asked 2009-11-27 06:15:43 +0800

pymsoft gravatar image pymsoft
133 5

updated 2009-11-27 06:16:18 +0800

I have a listbox that I resize when "onSize" event window and this run ok.

<window id="finestraAg" border="normal" sizable="true" onSize="onSizeWin()" onMaximize="onMaximizeWin()"
		title="${titolo}" width="600px" minheight="300" height="300px" maximizable="true" closable="true">
		<listbox id="box" multiple="false" rows="10"
			pagingPosition="top" mold="paging" pageSize="10"
			selectedItem="@{selected}" onSelect="" fixedLayout="true"
			selectedIndex="-1">
...
...
	void onSizeWin() {
		int heightFin = Integer.valueOf(finestraAg.getHeight().replace("px", "")).intValue();
		int pageSize = Math.max((heightFin - 220) / 10, 10);
		box.setPageSize(pageSize);
		box.setRows(pageSize);
	}


	void onMaximizeWin() {
		int heightFin = Integer.valueOf(finestraAg.getHeight().replace("px", "")).intValue(); // here, the value is ever 300px (if I not resize the window)
		int pageSize = Math.max((heightFin - 220) / 10, 10);
		box.setPageSize(40);
		box.setRows(40);
	}

1) when I maximize window the value of height not change, then I don't calcolate the new values for pageSize of listbox.
2) when I restore window I need a event like onRestore, but this event don't exist??.

How can I make this?

If I work with onClientInfo event work ok, but in this situation is a window that change your size/status and not the browser.


Any idea?


regards

Pedro Gonzalez

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2010-03-09 14:37:50 +0800

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

push!

link publish delete flag offensive edit

answered 2010-03-14 21:21:13 +0800

PeterKuo gravatar image PeterKuo
481 2

The height not change should be a bug. I posted to sourceforge
https://sourceforge.net/tracker/?func=detail&aid=2970460&group_id=152762&atid=785191

There is no onRestore event, because you can verify MaximizeEvent isMaximized()

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-11-27 06:15:43 +0800

Seen: 957 times

Last updated: Mar 14 '10

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