GWT:当鼠标熄灭时,让PopupPanel消失

时间:2011-06-20 07:33:40

标签: gwt popup panel

这是GWT PopupPanel ShowCase: http://gwt.google.com/samples/Showcase/Showcase.html#!CwBasicPopup

当用户点击面板时,Panel会隐藏..

当我使用鼠标移出面板区域时,我需要隐藏它...

如何做到这一点?

2 个答案:

答案 0 :(得分:6)

yourPopupPanel.addDomHandler(new MouseOutHandler() {
    public void onMouseOut(MouseOutEvent event) {
        yourPopupPanel.hide();
    }
}, MouseOutEvent.getType());

答案 1 :(得分:0)

    popuppanel.addMouseOutHandler(new MouseOutHandler()

{
  public void onMouseOut(MouseOutEvent event)
   {
      popuppanel.hide();
    }
    });