Project: SWT
Bug 21456 GTK: Cannot type in Text widget contained in Shell which has style bit as NO_TRIM
Reported: 2002-07-10 13:25:58 | Status: verified fixed

When the Shell has NO_TRIM as its style bit we cannot type in the text widget in that Shell. Here is the test: -------------test case starts here ---------------------------- import org.eclipse.swt.SWT; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.*; public class TestSWTNoTrimtext { public static void main(String[] args) { Display disp = Display.getDefault(); final Shell shell = new Shell(disp, SWT.NO_TRIM); try { shell.setLayout(new RowLayout(SWT.VERTICAL)); Text mainbox = new Text( shell, SWT.MULTI | SWT.HORIZONTAL | SWT.VERTICAL | SWT.CLIP_CHILDREN | SWT.CLIP_SIBLINGS | SWT.NULL); Button button = new Button(shell, SWT.BORDER); button.setText("Close"); //mainbox.setEnabled(true); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { shell.dispose(); } }); mainbox.setText("testing"); shell.setSize(200, 200); shell.open(); } catch (Exception e) { System.out.println("Error!!"); } while (!shell.isDisposed()) { if (!disp.readAndDispatch()) { disp.sleep(); } } } } --------------------------test case ends here --------------------------

Files changed in fix:
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java