-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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
push!
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()
Asked: 2009-11-27 06:15:43 +0800
Seen: 957 times
Last updated: Mar 14 '10