Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT Layout spoils in time


We need a lot more information before we can help you.
Please try to create a snippet that shows the problem.
Here's my best guess at a snippet you can start with - I am just guessing that you are using GridLayout.
Note that the layout in this snippet will not "spoil", but it will look "different" if someone resizes the window.

import org.eclipse.swt.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.widgets.*;

public class ButtonWithTextField {
        public static void main (String [] args) {
                Display display = new Display ();
                Shell shell = new Shell (display);
                shell.setLayout (new GridLayout ());
               
                Text text = new Text(shell, SWT.SINGLE | SWT.BORDER);
                text.setText("Text Field");
                text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
               
                Button button = new Button (shell, SWT.PUSH);
                button.setText ("Button");
                button.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false));

                shell.pack ();
                shell.open ();
                while (!shell.isDisposed ()) {
                        if (!display.readAndDispatch ()) display.sleep ();
                }
                display.dispose ();
        }
}

Carolyn



From: gokhanyamac <gokhanyamac@xxxxxxxxx>
To: platform-swt-dev@xxxxxxxxxxx
Date: 05/09/2008 09:26 AM
Subject: [platform-swt-dev] SWT Layout spoils in time






Hi there,

Hope can find help. I have provided a customer with a SWT interfaced
applications. They are using it on Windows XP and they told me recently that
the layout spoils (for example, the button that needs to be under the text
field comes next to it) when left open for 2-3 hours. In the beginning, the
interface is all normal and I have no idea what happens to the interface to
cause that.

Thank you in advance.

Gokhan
--
View this message in context:
http://www.nabble.com/SWT-Layout-spoils-in-time-tp17145974p17145974.html
Sent from the Eclipse Platform - swt mailing list archive at Nabble.com.

_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top