Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsmouseExit event missing.
https://www.eclipse.org/forums/index.php/mv/msg/162493/513944/#msg_513944
This problem shows up only in modal dialogs.
OS is gentoo. Can't tell if it works or not on windows because changing text color in button doesn't work at all.
Anyone had simmilar or the same problem?
Is it an OS error or coder error?
Kamil Wysocki]]>Kamil 2010-02-11T18:27:18-00:00Re: mouseExit event missing.
https://www.eclipse.org/forums/index.php/mv/msg/162493/514152/#msg_514152
It could be an swt bug, but I have not heard of it before, and could not
reproduce it with a snippet (below) on Ubuntu. Does the snippet below show
the problem for you? And if not, are you able to change it to show the
problem?
public static void main(String[] args) {
final Display display = new Display();
Shell shell = new Shell(display);
shell.setBounds(10,10,200,200);
Shell shell2 = new Shell(shell, SWT.APPLICATION_MODAL | SWT.SHELL_TRIM);
shell2.setBounds(200,200,200,200);
Button button = new Button(shell2, SWT.PUSH);
button.setBounds(50,50,50,50);
button.addMouseTrackListener(new MouseTrackAdapter() {
public void mouseEnter(MouseEvent e) {
System.out.println("ENTER");
}
public void mouseExit(MouseEvent e) {
System.out.println("EXIT");
}
});
shell.open();
shell2.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}
Grant
"Kamil" <soccki@o2.pl> wrote in message
news:hl1i6e$8al$1@build.eclipse.org...
> I'm using MouseTrackListener to change the text color of button text. I
get the mouseEnter event and change the text color but when cursor moves
rapidly out off button and dialog then there is no mouseExit event(only when
it rapidly exits dialog).
> This problem shows up only in modal dialogs.
> OS is gentoo. Can't tell if it works or not on windows because changing
text color in button doesn't work at all.
> Anyone had simmilar or the same problem?
> Is it an OS error or coder error? :)
>
> Kamil Wysocki]]>Grant Gayed2010-02-12T15:27:24-00:00Re: mouseExit event missing.
https://www.eclipse.org/forums/index.php/mv/msg/162493/514290/#msg_514290
problem still exists. Modal window must be above the parent window. try moving mouse down from button using code bellow.
Thank you again.
final Display display = new Display();
Shell shell = new Shell(display);
shell.setBounds(10,10,800,500);
Shell shell2 = new Shell(shell, SWT.APPLICATION_MODAL | SWT.SHELL_TRIM);
shell2.setBounds(200,200,125,125);
Button button = new Button(shell2, SWT.PUSH);
button.setBounds(50,50,50,50);
button.addMouseTrackListener(new MouseTrackAdapter() {
public void mouseEnter(MouseEvent e) {
System.out.println("ENTER");
}
public void mouseExit(MouseEvent e) {
System.out.println("EXIT");
}
});
shell.open();
shell2.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) display.sleep();
}
display.dispose();
}]]>Kamil 2010-02-13T18:36:04-00:00Re: mouseExit event missing.
https://www.eclipse.org/forums/index.php/mv/msg/162493/514781/#msg_514781
https://bugs.eclipse.org/bugs/show_bug.cgi?id=302956 ,
thanks!
Grant
"Kamil" <soccki@o2.pl> wrote in message
news:hl6rem$njt$1@build.eclipse.org...
> Hi,
>
> problem still exists. Modal window must be above the parent window. try
moving mouse down from button using code bellow.
> Thank you again.
>
> final Display display = new Display();
> Shell shell = new Shell(display);
> shell.setBounds(10,10,800,500);
> Shell shell2 = new Shell(shell, SWT.APPLICATION_MODAL | SWT.SHELL_TRIM);
> shell2.setBounds(200,200,125,125);
> Button button = new Button(shell2, SWT.PUSH);
> button.setBounds(50,50,50,50);
> button.addMouseTrackListener(new MouseTrackAdapter() {
> public void mouseEnter(MouseEvent e) {
> System.out.println("ENTER");
> }
> public void mouseExit(MouseEvent e) {
> System.out.println("EXIT");
> }
> });
> shell.open();
> shell2.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch()) display.sleep();
> }
> display.dispose();
> }]]>Grant Gayed2010-02-16T15:34:34-00:00