java - How to set different colors to individual items in an SWT Combo -
i have combo dropdown in swt , have been thinking of setting different colors different items in list based on conditions. i'll decide later (i.e if string has on 5 characters item should have red background otherwise should green)
i managed change background of whole combo widget have noticed no method change background individual items.
color colorgreenswt = new color(null, 0, 255, 0); combo combo = new combo(comp, swt.drop_down); string[] languages = { "i", "it", "item", "items", "more_items" }; (int = 0; < languages.length; i++) combo.add(languages[i]); combo.setbackground(colorgreenswt);
so there method select background color each item in part?
combo not allow that. nebula project has tablecombo widget [1] might interest you. swt has extended custom combo called ccombo might want @ [2].
[1] https://eclipse.org/nebula/widgets/tablecombo/tablecombo.php
Comments
Post a Comment