Skip to main content



      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 05:13 Go to next message
Eclipse UserFriend
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 15:00 Go to previous message
Eclipse UserFriend
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: Sun Aug 31 00:40:41 EDT 2025

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

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

Back to the top