0

Changing the color of a row in the servlet when mouse over

asked 2013-10-24 10:13:32 +0800

Antoc gravatar image Antoc
21 4

I would like to specify the color of a selected in a grid via the servlet. Say the row is displayed in red but when the mouse is over it, the colour should change to orange. I have created the following code but the color doesn't change when the mouse is over it.

row.setStyle("background-color: orange");
row.addEventListener("onMouseOver", new EventListener() {
      public void onEvent(Event e) {
            row.setStyle("background-color: black;");
      }
});

Any ideas about how to do it? Thanks in advance!

delete flag offensive retag edit
Be the first one to answer this question!
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: 2013-10-24 10:13:32 +0800

Seen: 8 times

Last updated: Oct 24 '13

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