Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Change CSS class at runtime
Change CSS class at runtime [message #804350] Wed, 22 February 2012 14:23 Go to next message
Marco Carnazzo is currently offline Marco CarnazzoFriend
Messages: 8
Registered: July 2009
Junior Member
I want to highlight a label at runtime (like a karaoke).

I added a .highlight class in my CSS and, after an event, I called this code:

label.setData(CSSSWTConstants.CSS_CLASS_NAME_KEY, "highlight");


Nothing happens Sad

Event handling works: if I use label.setBackground, it's ok.
Also CSS at compiled time works.

Maybe I have to redraw something but what? (I also tried label.redraw and label parent redraw)

Thanks.
Re: Change CSS class at runtime [message #809074 is a reply to message #804350] Tue, 28 February 2012 13:02 Go to previous messageGo to next message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

You might have to fire an event, as setData(*) does not. Please open a bug at https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform&component=UI

PW


Re: Change CSS class at runtime [message #809790 is a reply to message #809074] Wed, 29 February 2012 09:11 Go to previous message
Marco Carnazzo is currently offline Marco CarnazzoFriend
Messages: 8
Registered: July 2009
Junior Member
Done Smile
Previous Topic:Eclipse 4 vs. Eclipse 3.x
Next Topic:Perspective switcher and other stuff in the window borders
Goto Forum:
  


Current Time: Thu Apr 18 07:58:45 GMT 2024

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

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

Back to the top