Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » FocusListeners, part 2(Adding a focuslistener to a canvas that contains standard widgets)
FocusListeners, part 2 [message #526211] Fri, 09 April 2010 09:13 Go to next message
Katarina Olsson is currently offline Katarina OlssonFriend
Messages: 3
Registered: March 2010
Junior Member
I asked a question regarding focus listeners a while ago, and got an excellent, helpful answer, so I'll try this again.

Basically, my problem is the following:

I add untyped focuslisteners (SWT.FocusIn and SWT.FocusOut) to my canvas widget, which works perfectly fine. But when I try to add e.g. a Button with the canvas as parent, the focuslistener that I added to the canvas doesn't work anymore. Has anyone got any idea why this happens, and what I can do about it?



Re: FocusListeners, part 2 [message #526354 is a reply to message #526211] Fri, 09 April 2010 19:00 Go to previous message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Katarina Olsson wrote:
> I add untyped focuslisteners (SWT.FocusIn and SWT.FocusOut) to my canvas
> widget, which works perfectly fine. But when I try to add e.g. a Button
> with the canvas as parent, the focuslistener that I added to the canvas
> doesn't work anymore. Has anyone got any idea why this happens, and what
> I can do about it?
When you add Button to Canvas, how does the Button widget covers Canvas
widget - completely or partly ? In that case of completely covering, all
focus events will be received by only Button itself as Canvas is no more
exposed. So, you might need to deal with focus listeners of Button further.
Anyway, providing us the snippet might help to resolve the problem at
the earliest.
Previous Topic:problem with the Printer.class
Next Topic:SWT Browser problem
Goto Forum:
  


Current Time: Thu Mar 28 12:53:12 GMT 2024

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

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

Back to the top