|
Re: Prevent events from firing [message #459607 is a reply to message #459596] |
Fri, 12 August 2005 14:03 |
Harleen Sahni 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
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02956 seconds