Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Combo and color for items?
Combo and color for items? [message #1856309] Thu, 01 December 2022 17:52 Go to next message
Eclipse UserFriend
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 11:58 Go to previous message
Eclipse UserFriend
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 12:01] by 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: Mon Mar 17 14:23:17 EDT 2025

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

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

Back to the top