Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Mouse resize listener


This won't work because you only get mouse events in the client area.  When you double click, Windows maximizes your shell and leaves an outstanding mouse up that your application sees.



Brian Al Saadi <brian.alsaadi@xxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

11/25/2004 10:31 AM

Please respond to
platform-swt-dev

To
platform-swt-dev@xxxxxxxxxxx
cc
Subject
[platform-swt-dev] Mouse resize listener





Hello

Im trying to catch a resize event of my application. The problem is
that I get many resize events while I only need the last one, i.e the
last event fired when my mouse is up. So I tried having a global
boolean variable that is set to true when I get a control resize
event. Also I have a MouseListener

<code>
shell.addMouseListener(new MouseAdapter(){

                                                                   public void mouseUp(MouseEvent me)
                                                                   {
                                                                                    System.out.println("mouseUp");
                                                                                    if(resizing)
                                                                                    {
                                                                                                     resizing = false;
                                                                                                     System.out.println("Do the magic");
                                                                                    }
                                                                   }
                                                  });
</code>

The problem is that the "mouseUp" sentence is not written to the
screen when I drag the border and release the mouse. But when I double
click on the title bar of the shell I get the MouseUp event...

Any suggestions

Thanks
Brian
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top