0

Tree onMouseover

asked 2007-04-25 10:00:54 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: ifi

Hello,

When I go over a treeitem with the cursor it changes the background color.

Is it possible NOT to change the cursor and the background color of the treeitem onMouseover? If yes, how and where do I change it?

Thanks in advance,

ifi

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2007-04-27 13:37:17 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: jumperchen

You need disable the event of JavaScript of Tree component in the zul.jar by manual manipulation.

The tree.js as follows,

zkTrow.init=function(cmp){
zk.listen(cmp,"click",zkTree.onclick);
zk.listen(cmp,"keydown",zkTree.onkeydown);
//zk.listen(cmp,"mouseover",zkSel.onover);
//zk.listen(cmp,"mouseout",zkSel.onout);
};

NOTE: this way is risky.

Regards,
Jumper

link publish delete flag offensive edit

answered 2011-11-23 17:06:29 +0800

UmbraNoctis gravatar image UmbraNoctis
9

Actually you should modify the css regarding the hover event.

tr.z-treerow-over > td.z-treecell {
	border-top: 1px solid #e3f2ff;
	border-bottom: 1px solid #e3f2ff;
}
tr.z-treerow-over {
	background-image: url(${c:encodeURL('~./zul/img/grid/column-over.png')});
}
tr.z-treerow-over-seld {
	background: #c5e8fa;
}

that piece of code was taken from here; as an introduction you could read this

The whole point is finding the component and the event, and checking how it modifies the style, the overriding it with a style of your own. In this case it is done by setting a background image. Change it to:

tr.z-treerow-over {
	background-image: none;
}

And it should do the trick

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

RSS

Stats

Asked: 2007-04-25 10:00:54 +0800

Seen: 532 times

Last updated: Nov 23 '11

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