0

MouseUp and Mousedown events are not working for PopupPanel in GWT, but the same code is working for normal view in GWT.Is there any thing we need to do before writing mouse events on GWT PopupPanel.Kindly guide me as soon as possible.

Onkar
  • 652
  • 3
  • 15
  • 1
    Please share the code you have written so far to help us pinpoint the problem. – Robbert Jan 02 '14 at 18:54
  • 1
    Most problems in this area stem from using `setModal(true)` - which is strongly discouraged. If you do, try using `setGlassEnabled(true)` instead. – Chris Lercher Jan 02 '14 at 20:04
  • Hi i have written code like below. Imagepane.addMouseDownHandler(new MouseDownHandler (){ @override public void onMouseDown(MouseDownEvent event) { x=event.getX()-Imagepane.getAbsoluteLeft(); Y=event.getY()-Imagepane.getAbsoluteTop(); }}); – user3154688 Jan 03 '14 at 17:33
  • For above code on view screen if we click button one popup will come,there if we clicked one button we will get some image there i need this mouse events should work.but zoom and rotate image are working..but this mouse events are not working.. – user3154688 Jan 03 '14 at 17:35
  • @ChrisLercher...i checked in my code but could not find "setModal(true)" any where..kindly do the needful.i am suspecting some gwt old versions mouse events are not working for popup panle in gwt..kindly clearly expalin me where i need to do changes..hope with experts help i can solve the issue..:) – user3154688 Jan 03 '14 at 17:38
  • Pls advise me how to solve the issue... – user3154688 Jan 04 '14 at 06:14

2 Answers2

0
                      popup.addMouseUpHandler(new MouseUpHandler()
            {
                public void onMouseUp(MouseUpEvent event)
                {

            popup.setPopupPositionAndShow(new PopupPanel.PositionCallback() 
             {
                  public void setPosition(int offsetWidth, int offsetHeight) 
                  {
                    int left = (Window.getClientWidth() - offsetWidth) / 24;
                    int top = (Window.getClientHeight() - offsetHeight) / 5;

                    popup.setPopupPosition(left, top);


                  }
            });
            }
            });
user
  • 1
  • 4
0

I've solved this problem for myself by calling "setModal(false)" on the popup panel that contains the DateBox widget.

Mat DeLong
  • 297
  • 4
  • 17