The sizable Property

If you allow users to resize the window, you can specify true to the sizable property as follows. Once allowed, users can resize the window by dragging the borders.

<window id="win" title="Sizable Window" border="normal" width="200px" sizable="true">
    This is a sizable window.    
    <button label="Change Sizable" onClick="win.sizable = !win.sizable"/>    
</window>

The onSize Event

Once a user resizes the window, the onSize event is sent with an instance of org.zkoss.zul.event.SizeEvent. Notice that the window is resized before the onSize event is sent. In other word, the event serves as a notification that you generally ignore. Of course, you can do whatever you want in the event listener.

Note: If the user drags the upper or left border, the onMove event is also sent since the position is changed, too.