Bonjour,
Je travaille depuis (très) peu avec Eclipse et SWT. Je rencontre un petit problème très gênant auquel beaucoup de gens devraient pouvoir répondre à mon avis tant c'est trivial.
Je développe actuellement un plugin Eclipse et je voudrais changer la couleur de fond d'un label. Pour cela j'utilise la méthode "setBackgroundColor".
Jai tenté quelques essais :
-> erreur :Code:
1
2
3 Label label = new Label(compohaut, SWT.NONE); label.setBackground(SWT.COLOR_DARK_RED);
ouCode:The methode setBackground(Color) is not applicable for the arguments (int)
-> erreur :Code:
1
2
3
4 Color color = Color.RED; Label label = new Label(compohaut, SWT.NONE); label.setBackground(color);
Code:The methode setBackground(Color) is not applicable ifor the arguments (Color)
ou encore
-> erreur :Code:
1
2
3 Label label = new Label(compohaut, SWT.NONE); label.setBackground(new RGB(200, 200, 255));
Code:The methode setBackground(Color) is not applicable ifor the arguments (RGB)
...J'avoue être à cours de munitions maintenant...
Une idée?
Merci beaucoup