### Eclipse Workspace Patch 1.0 #P org.eclipse.swt Index: Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java,v retrieving revision 1.139 diff -u -r1.139 CCombo.java --- Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java 31 May 2010 16:44:12 -0000 1.139 +++ Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java 11 Jun 2010 21:50:36 -0000 @@ -54,7 +54,7 @@ Button arrow; boolean hasFocus; Listener listener, filter; - Color foreground, background; + Color listForeground, listBackground; Font font; Shell _shell; @@ -467,8 +467,8 @@ if ((style & SWT.LEFT_TO_RIGHT) != 0) listStyle |= SWT.LEFT_TO_RIGHT; list = new List (popup, listStyle); if (font != null) list.setFont (font); - if (foreground != null) list.setForeground (foreground); - if (background != null) list.setBackground (background); + if (listForeground != null) list.setForeground (listForeground); + if (listBackground != null) list.setBackground (listBackground); int [] popupEvents = {SWT.Close, SWT.Paint, SWT.Deactivate}; for (int i=0; i + * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + *

+ * @param color the new color (or null) + * + * @exception IllegalArgumentException + * @exception SWTException + * @since 3.7 + */ +public void setTextBackground(Color color) { if (text != null) text.setBackground(color); - if (list != null) list.setBackground(color); if (arrow != null) arrow.setBackground(color); } /** + * Sets the list widget's background color to the color specified + * by the argument, or to the default system color for the control + * if the argument is null. + *

+ * Note: This operation is a hint and may be overridden by the platform. + * For example, on Windows the background of a Button cannot be changed. + *

+ * @param color the new color (or null) + * + * @exception IllegalArgumentException + * @exception SWTException + * @since 3.7 + */ +public void setListBackground(Color color) { + listBackground = color; + if (list != null) list.setBackground(color); +} +/** * Sets the editable state. * * @param editable the new editable state @@ -1442,7 +1486,7 @@ } public void setForeground (Color color) { super.setForeground(color); - foreground = color; + listForeground = color; if (text != null) text.setForeground(color); if (list != null) list.setForeground(color); if (arrow != null) arrow.setForeground(color);