0

Display button when mouse over a listitem

asked 2014-01-20 07:46:05 +0800

pjiang gravatar image pjiang
46 2

Hi, I need to develop an effect that button is hidden until mouse over.When mouse over the selected item, button shows up and user can click it.

I tried to do it in following way:

1.create button and make visible="false" 2.catch "onMouseOver" event and set visible="true" 3.reload the component

It does not work for me. Can somebody help?

Thank You!

delete flag offensive retag edit

Comments

1

show your zul

sitansu ( 2014-01-20 10:05:40 +0800 )edit

3 Answers

Sort by » oldest newest most voted
2

answered 2014-01-29 04:54:00 +0800

MVarun gravatar image MVarun flag of India
268 1 6

Hi,

Here is how you can write in your window class...

listitem.addEventListener("onMouseOver", new EventListener() 
    {
        @Override
        public void onEvent(Event arg0) throws Exception 
        {
            button.setVisible(true);
        }
    });

listitem.addEventListener("onMouseOut", new EventListener() 
    {
        @Override
        public void onEvent(Event arg0) throws Exception 
        {
            button.setVisible(false);
        }
    });

Please let me know its working or not..

Varun.

link publish delete flag offensive edit
1

answered 2014-01-23 10:42:21 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9
https://github.com/chillw...

updated 2014-01-24 06:12:35 +0800

Normally when an item is visible you can't work with it on client side. Or you wrap it in a "wrapper" and onmouseover of the wrapper shows the button or work with css that you alternate on mouseover.

Greetz chill.

link publish delete flag offensive edit
0

answered 2014-01-28 20:06:49 +0800

javikin gravatar image javikin flag of Mexico
45 2
http://www.yellowme.mx/

Here a sample, i hope this help you:

http://zkfiddle.org/sample/2uk9q01/1-hide-button-with-mouse-over

link publish delete flag offensive edit
Your answer
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: 2014-01-20 07:46:05 +0800

Seen: 39 times

Last updated: Jan 29 '14

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