Project: SWT
Bug 20083 CCombo method redraw() does not work
Reported: 2002-06-12 17:34:15 | Status: resolved fixed

Build 20020611 Win2k Calling the redraw() method on a CCombo does not redraw the CCombo. It will, however, draw a CCombo's border if one is present. Using the redraw(int, int, int, int, boolean) method does work though. The redraw(int, int, int, int, boolean) is overridden in CCombo to deal with the fact that it is implemented using a Text and a Button as children. However, redraw() is not overridden, so it will only draw the underlying composite, and not the children (which is what you see). Here's an example to see this: ---------------------- public static void main (String[] args) { Display display = new Display (); Shell shell = new Shell (display); shell.setLayout (new GridLayout ()); final Combo combo = new Combo (shell, SWT.NONE); final CCombo ccombo = new CCombo (shell, SWT.NONE); shell.pack (); shell.open (); shell.forceFocus (); GC gc = new GC (display); gc.fillRectangle (shell.getBounds ()); gc.dispose (); shell.redraw (); combo.redraw (); ccombo.redraw (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } ----------------------

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CCombo.java