Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Label with FocusListener
Label with FocusListener [message #458082] Sat, 09 July 2005 04:25 Go to next message
Eclipse UserFriend
Originally posted by: songlin78.gmail.com

I have a composite with a few labels, and I like to change their
background colors when they have the focus. If label1 has the focus, its
background become blue and all other lables' background become default
color. It is like highlighting the selected label. I tried to add Select
event listener and FocusListener and neight of them was fired when I
clicked on the label. I tried to avoid MouseListener for some reason.
Does anyone has other idea to share?

Thanks in advance
Re: Label with FocusListener [message #458264 is a reply to message #458082] Tue, 12 July 2005 13:59 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
Labels don't take focus when you click on them. You can force them to take
focus (using Control.forceFocus()) but they don't draw differently to
inticate that they have focus and users don't expect this.

"Brian Lin" <songlin78@gmail.com> wrote in message
news:danjk8$d8e$1@news.eclipse.org...
> I have a composite with a few labels, and I like to change their
> background colors when they have the focus. If label1 has the focus, its
> background become blue and all other lables' background become default
> color. It is like highlighting the selected label. I tried to add Select
> event listener and FocusListener and neight of them was fired when I
> clicked on the label. I tried to avoid MouseListener for some reason.
> Does anyone has other idea to share?
>
> Thanks in advance
Previous Topic:Widget Transparency
Next Topic:Docking Multiple ViewParts in an ApplicationWindow
Goto Forum:
  


Current Time: Wed Oct 21 02:43:10 GMT 2020

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

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

Back to the top