AfterSizeEvent"

From Documentation
m (correct highlight (via JWB))
Line 6: Line 6:
 
*Java API: <javadoc>org.zkoss.zk.ui.event.AfterSizeEvent</javadoc>
 
*Java API: <javadoc>org.zkoss.zk.ui.event.AfterSizeEvent</javadoc>
 
*JavaScript API: N/A
 
*JavaScript API: N/A
 +
{{versionSince | 6.5.2}}
  
 
= Employment/Purpose =
 
= Employment/Purpose =
Line 28: Line 29:
 
</window>
 
</window>
 
</source>
 
</source>
 
=Supported events=
 
 
{| class='wikitable' | width="100%"
 
! <center>Name</center>
 
! <center>Event Type</center>
 
|-
 
| None
 
| None
 
|}
 
 
=Supported Children=
 
 
*NONE
 
 
=Use cases=
 
 
{| class='wikitable' | width="100%"
 
! Version !! Description !! Example Location
 
|-
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
|}
 
  
 
=Version History=
 
=Version History=

Revision as of 10:24, 9 June 2022


AfterSizeEvent

AfterSizeEvent

Since 6.5.2

Employment/Purpose

Represents an event that resizes and provides the new size of a component.

Example

Resize the window component to show different sized images accordingly.

<window title="AfterSizeEvent" border="normal" width="250px" height="200px" maximizable="true" sizable="true">
	<custom-attributes org.zkoss.zul.image.preload="true" />
	<attribute name="onAfterSize"><![CDATA[
		int width = event.getWidth();
		if (width >= 600)
			image.setSrc("/image/large.jpg");
		else if (width >= 400 && width < 600)
			image.setSrc("/image/medium.jpg");
		else
			image.setSrc("/image/small.jpg");
	]]></attribute>
	<image id="image" src="/image/small.jpg" />
</window>

Version History

Version Date Content
6.5.2 March 2013 Add onAfterSize event to get component size



Last Update : 2022/06/09

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.