0

bandbox image button

asked 2006-08-22 21:45:58 +0800

admin gravatar image admin
18691 1 10 128
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3879836

By: nobody

Hi
I am customising my page and I need to change the band box button image I saw bandbtn.gif inside zul.jar/web/zul/img

Is there a neat way I can override this?



Thx

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2006-08-23 04:01:47 +0800

admin gravatar image admin
18691 1 10 128
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3880157

By: henrichen

with zuml:

<bandbox image="YOUR_IMAGE_URL" ...>

with java code:

mybandbox.setImage(YOUR_IMAGE_URL);

http://zk1.sourceforge.net/javadoc/2.1.0/zul/com/potix/zul/html/Bandbox.html#set
Image(java.lang.String)

link publish delete flag offensive edit

answered 2014-02-25 08:03:48 +0800

anilsikandra gravatar image anilsikandra
21 1

updated 2014-02-25 08:09:50 +0800

I am getting this error. I have seen bandbox class, this class have image defined like this private static final String DEFAULT_IMAGE = "~./zul/img/bandbtn.gif"; due to this problem i am unable to change image ... can any one help to change image .... beacuse i am getting below error

org.zkoss.zk.ui.metainfo.PropertyNotFoundException: Method setImage not found for class org.zkoss.zul.Bandbox at org.zkoss.zk.ui.metainfo.Property.resolve(Property.java:186) at org.zkoss.zk.ui.metainfo.Property.assign0(Property.java:202) at org.zkoss.zk.ui.metainfo.Property.assign(Property.java:169) at org.zkoss.zk.ui.metainfo.ComponentInfo.applyProperties(ComponentInfo.java:729) at org.zkoss.zk.ui.impl.AbstractUiFactory.newComponent(AbstractUiFactory.java:106) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:857) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:735) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:699) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:872) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:826)

link publish delete flag offensive edit

answered 2014-04-17 14:08:32 +0800

dpchandra gravatar image dpchandra
1 1

Hi,

I am also in need of the same requirement. I tried it by applying image attribute to <bandbox> but it is giving error as there is no setImage() for org.zkoss.zul.Bandbox. I have looked into the source code and didn't find that method.

Can someone please help me in this.

link publish delete flag offensive edit

answered 2018-02-22 20:56:05 +0800

Mihik gravatar image Mihik
1

Hello. I tried to change bandbox icon but still no luck. CSS also doesnt help, it adds another image but not overrides the standard one, for example.

.z-bandbox-icon { background: transparent url(${c:encodeURL('/images/custom.png')}) no-repeat 0 0; }

Can someone help?

link publish delete flag offensive edit

answered 2018-02-23 11:28:27 +0800

cor3000 gravatar image cor3000
3967 1 7
ZK Team

updated 2018-02-23 11:30:41 +0800

there are several ways to customize the icon. I gathered a few examples (including one using a png icon) in this ZK fiddle example.

It shows how the standard icon in the ::before pseudo element can be hidden:

.z-bandbox .z-bandbox-icon::before {
    display: none;
}

I hope this helps. The example was tested using ZK 8.5.0 if a different version is required and the current approach causes problems please let me know.

Robert

link publish delete flag offensive edit

answered 2018-02-27 13:51:31 +0800

Mihik gravatar image Mihik
1

Thanks, Robert! That helped and worked fine in ZK 8.0 too

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2006-08-22 21:45:58 +0800

Seen: 381 times

Last updated: Feb 27

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More