|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
z order composite text swt 3.2.36CCode that worked in 3.1 is broken in 3.2. Text is hidden behind a composite.
I expect the text control to show "on top" of the composite: import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; public class MyLayout { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); FormLayout formLayout = new FormLayout (); shell.setLayout (formLayout); Composite composite0 = new Composite (shell, SWT.BORDER); FormData data = new FormData (); composite0.setLayoutData (data); // why is this hidden behind the composite? Text text2 = new Text (shell, SWT.BORDER); text2.setText ("text2"); FormData data1 = new FormData (); data1.right = new FormAttachment (composite0, 10, SWT.RIGHT); // data1.left = new FormAttachment (composite0, 10, SWT.RIGHT); data1.bottom = new FormAttachment (composite0, 0, SWT.BOTTOM); text2.setLayoutData (data1); shell.pack (); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } } |
||||||||
|
|
Re: z order composite text swt 3.2.36CAftr creating text2, use: text2.moveAbove(composite0); Carolyn
Code that worked in 3.1 is broken in 3.2. Text is hidden behind a composite. I expect the text control to show "on top" of the composite: import org.eclipse.swt.SWT; import org.eclipse.swt.layout.FormAttachment; import org.eclipse.swt.layout.FormData; import org.eclipse.swt.layout.FormLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; import org.eclipse.swt.widgets.Text; public class MyLayout { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); FormLayout formLayout = new FormLayout (); shell.setLayout (formLayout); Composite composite0 = new Composite (shell, SWT.BORDER); FormData data = new FormData (); composite0.setLayoutData (data); // why is this hidden behind the composite? Text text2 = new Text (shell, SWT.BORDER); text2.setText ("text2"); FormData data1 = new FormData (); data1.right = new FormAttachment (composite0, 10, SWT.RIGHT); // data1.left = new FormAttachment (composite0, 10, SWT.RIGHT); data1.bottom = new FormAttachment (composite0, 0, SWT.BOTTOM); text2.setLayoutData (data1); shell.pack (); shell.open (); while (!shell.isDisposed ()) { if (!display.readAndDispatch ()) display.sleep (); } display.dispose (); } } -- View this message in context: http://www.nabble.com/z-order-composite-text-swt-3.2.36C-tp17081867p17081867.html Sent from the Eclipse Platform - swt mailing list archive at Nabble.com. _______________________________________________ platform-swt-dev mailing list platform-swt-dev@... https://dev.eclipse.org/mailman/listinfo/platform-swt-dev _______________________________________________ platform-swt-dev mailing list platform-swt-dev@... https://dev.eclipse.org/mailman/listinfo/platform-swt-dev |
| Free embeddable forum powered by Nabble | Forum Help |