-
FEATURED COMPONENTS
First time here? Check out the FAQ!
i wanna ask, how to change the window position in zk, everytime i make a new window, the position always on the top left screen,
i already change the position parameter in the .zul, but still the windows stay on top left of the screen
here's my code
<window title="WMS Login" border="normal" width="300px" id="login" position="center">
position="center" mode="overlapped"
will work :)
If you want to open a stack of windows in "cascade" style you must use the "overlapped" feature. Provided you create the window as a component in your code you can use something like this:
private static final int TOP = 15; private static final int LEFT = 115; private static final int INCREMENT = 15; private static final int MAX_INCREMENT = 150; private int windows = 0; Window window = (Window) Executions.createComponents(windowName, null, null); int incr = INCREMENT * windows++; incr = incr > MAX_INCREMENT ? 0 : incr; window.setLeft((LEFT + incr) + "px"); window.setTop((TOP + incr) + "px"); window.doOverlapped();
Asked: 2012-09-04 02:47:54 +0800
Seen: 148 times
Last updated: Oct 04 '12