PDA

View Full Version : Hide window OnMouseOut



Mohammad
29 Apr 2009, 8:57 PM
Hi there,

Can any one advise on who to hide gxt or gwt window onMouseOut plz. So simply if you moved the mouse out of the window then window should be hidden.

Thanks in advance.

Cheers,
Mohammad

takayser
1 May 2009, 5:35 AM
public void onModuleLoad() {

final Window w = new Window() {
@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
sinkEvents(Event.ONMOUSEOUT);
};
};
w.setSize(500, 500);

w.addListener(Events.OnMouseOut, new Listener<BaseEvent>() {
public void handleEvent(BaseEvent be) {
w.hide();
}
});
w.show();
}

Mohammad
3 May 2009, 3:25 PM
Thanks for your reply.

Cheers,
Mohammad