LabelImageElement"

From Documentation
m
Line 22: Line 22:
 
<source lang="xml" high="2">
 
<source lang="xml" high="2">
 
<button image="xxx.png">
 
<button image="xxx.png">
   <custom-attributes org.zkoss.zul.image.preload=”true”/>
+
   <custom-attributes org.zkoss.zul.image.preload="true"/>
 
</button>
 
</button>
 
</source>
 
</source>
Line 32: Line 32:
 
<source lang="xml" high="2">
 
<source lang="xml" high="2">
 
<window>
 
<window>
   <custom-attributes org.zkoss.zul.image.preload=”true”/>
+
   <custom-attributes org.zkoss.zul.image.preload="true"/>
 
   <button image="xxx.png"/>
 
   <button image="xxx.png"/>
 
   <image src="xxx.png"/>
 
   <image src="xxx.png"/>
Line 38: Line 38:
 
</source>
 
</source>
  
As you can see, the ''custom-attributes'' will be checked recursively.
+
As you can see, the ''custom-attributes'' will be checked recursively (see also <javadoc method="getAttribute(java.lang.String,boolean)">org.zkoss.zk.ui.ext.Scope</javadoc>).
  
 
=Example=
 
=Example=

Revision as of 11:35, 2 November 2011


LabelImageElement


Label Image Element

Employment/Purpose

An HTML element with a label and an image.

Preload Image

since 6.0.0

The feature is applied to all of the LabelImageElement and Image components.

By default the preload function is disabled, so users have to specify the custom-attributes and set it to true. For example,

<button image="xxx.png">
  <custom-attributes org.zkoss.zul.image.preload="true"/>
</button>

Or specify it just below the root component.

For example,

<window>
  <custom-attributes org.zkoss.zul.image.preload="true"/>
  <button image="xxx.png"/>
  <image src="xxx.png"/>
</window>

As you can see, the custom-attributes will be checked recursively (see also Scope.getAttribute(String, boolean)).

Example

N/A


Supported Events

Name
Event Type
None None

Supported Children

*All

Version History

Version Date Content
6.0.0 September 2011 A way to pre-load images since many UIs depend on the size of an image



Last Update : 2011/11/02

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