LabelImageElement

From Documentation


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)).

Since 6.5.2

The feature can also applied from zk.xml as a library property.

For example,

<!-- zk.xml -->
<zk>
    <library-property>
        <name>org.zkoss.zul.image.preload</name>
        <value>true</value>
    </library-property>
</zk>

IconSclass

Allow you to specify built-in icon CSS classes, see ZK_Developer's_Reference/Integration/Presentation_Layer/Font_Awesome

Supported Events

Supported Children

*All

Version History

Version Date Content
8.6.2 May 2019 ZK-4243: The result of hflex="min" is not sufficient if the content has Font Awesome icons
7.0.0 October 2012 Add iconSclass attribute with FontAwesome supported.
6.0.0 September 2011 ZK-314: A way to pre-load images since many UIs depend on the size of an image
10.0.0 August 2023 ZK-5502: Allow users to customize tooltip on the icon
10.0.0 August 2023 ZK-5503: Allow users to set multiple icons and tooltips on the same LabelImageElement
10.0.0 September 2023 ZK-5119: Integrate Font Awesome 6 free icons



Last Update : 2024/03/06

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