Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionif (e.Index != -1) { //Si la souris survole l'ÈlÈment dans la dropdowmlist { //Ecrit la valeur ToString de l'élément avec une couleur choisie string mot = "Ce"; e.Graphics.DrawString(mot, e.Font, Brushes.Red, new PointF(e.Bounds.X, e.Bounds.Y)); mot = " texte"; e.Graphics.DrawString(mot, e.Font, Brushes.Blue, new PointF(e.Bounds.X + 20, e.Bounds.Y)); mot = " doit"; e.Graphics.DrawString(mot, e.Font, Brushes.Green, new PointF(e.Bounds.X + 40, e.Bounds.Y)); mot = " être"; e.Graphics.DrawString(mot, e.Font, Brushes.Coral, new PointF(e.Bounds.X + 60, e.Bounds.Y)); mot = " coloré."; e.Graphics.DrawString(mot, e.Font, Brushes.Yellow, new PointF(e.Bounds.X + 80, e.Bounds.Y)); } }