Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Combo and color for items?
Combo and color for items? [message #1856309] Thu, 01 December 2022 22:52 Go to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 195
Registered: February 2013
Senior Member
Hi all
Can I control the color of the ComboBox items?
Not one color for all, but a personal color for the element.
Dmitry
Re: Combo and color for items? [message #1856357 is a reply to message #1856309] Tue, 06 December 2022 16:58 Go to previous message
Julien Guigné is currently offline Julien GuignéFriend
Messages: 9
Registered: April 2022
Junior Member
Hi,

the easiest solution seems to implements a ComboViewer wrapping the combo.
https://www.vogella.com/tutorials/EclipseJFace/article.html#jface-comboviewer

And setting a DecoratingLabelProvider instead of a simple LabelProvider.
DecoratingLabelProvider implements getBackground(Object element)
https://javadoc.scijava.org/Eclipse/org/eclipse/jface/viewers/DecoratingLabelProvider.html
Idem for font and foreground.

Another possibility might involve changing item's style by ClientScripting.
https://www.eclipse.org/rap/developers-guide/devguide.php?topic=scripting.html&version=3.22
Can be tried by persevering developers...

Good luck !

[Updated on: Tue, 06 December 2022 17:01]

Report message to a moderator

Previous Topic: Remote Object - instant variable transmittion of both sides?
Next Topic:RAP client error when disposing controls very early
Goto Forum:
  


Current Time: Sat Dec 14 16:22:03 GMT 2024

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

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

Back to the top