Menu

#11 EditableLabel css hover hook

open
nobody
5
2006-12-14
2006-12-14
Anonymous
No

EditableLabel is great, but I'd like a css hook for the hover state so I can change the background color etc.

This code accomplishes this or making the text label protected so I could extend the component would work.

text.addMouseListener(new MouseListenerAdapter(){
public void onMouseEnter(Widget sender) {
text.addStyleName("editableLabel-label-hover");
}
public void onMouseLeave(Widget sender) { text.removeStyleName("editableLabel-label-hover"); }
});

Discussion


Log in to post a comment.