Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Re: Prevent events from firing
Re: Prevent events from firing [message #459596] Thu, 11 August 2005 22:33 Go to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
You could use Display.addFilter() to filter out the event from SWT but you
won't stop it from happening in the operating system. BTW, this seems like
a dangerous/strange thing to do.

"Harleen Sahni" <hsahni@us.ibm.com> wrote in message
news:ddg12l$ec$1@news.eclipse.org...
> Hi,
>
> Is there a way to prevent an event from firing in a control wrapped in a
> composite? Like if you have a button in a panel, the mouse exit event
> fires for the panel when you enter button, even though you're still
> inside the boundaries of the panel. (At least on Windows). I'd like to
> change this behavior. Thanks.
>
> Harleen
Re: Prevent events from firing [message #459607 is a reply to message #459596] Fri, 12 August 2005 14:03 Go to previous message
Harleen Sahni is currently offline Harleen SahniFriend
Messages: 5
Registered: July 2009
Junior Member
Well, I guess I shouldn't say completely cancel these events from
firing, I just wouldn't want the ones that don't make sense to be
visible to anyone using a custom control. If I have written a control,
and someone is listening to it's mouse enter and exit events, it would
probably be strange to them if they are getting notified of exit and
enter events on my control even though the mouse is still actually
inside it's boundaries, just over another control inside it. In this
case, they'd have to always check to see if the mouse was in the control
or not.

I also thought of using a Display.addFilter(), but I didn't know how
appropriate it would be to do something like this at the display level
when I'm concerned with only one control. It doesn't seem like the most
effecient way, but I guess it may be the only way.

(Sorry, I cancelled my original message... it was showing up three times
in my newsreader and I thought I had accidentally triple posted)

Steve Northover wrote:
> You could use Display.addFilter() to filter out the event from SWT but you
> won't stop it from happening in the operating system. BTW, this seems like
> a dangerous/strange thing to do.
>
> "Harleen Sahni" <hsahni@us.ibm.com> wrote in message
> news:ddg12l$ec$1@news.eclipse.org...
>
>>Hi,
>>
>>Is there a way to prevent an event from firing in a control wrapped in a
>>composite? Like if you have a button in a panel, the mouse exit event
>>fires for the panel when you enter button, even though you're still
>>inside the boundaries of the panel. (At least on Windows). I'd like to
>>change this behavior. Thanks.
>>
>>Harleen
>
>
>
Previous Topic:Tab Items inside a viewer
Next Topic:WindowShade 4.x DOES NOT WORK with Eclipse 3.1
Goto Forum:
  


Current Time: Thu Apr 25 09:22:50 GMT 2024

Powered by FUDForum. Page generated in 0.02956 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top