Size trouble with dialog box [message #450307] |
Thu, 10 February 2005 10:40 |
Eclipse User |
|
|
|
Originally posted by: ssc.acentic.net
Hi
I try now for several hours to get a dialogbox to work in the size
I set it, but it does always set its size to what ever.
I do this and I expect to have a DialogBox at 500x220 but it
only shows up as a small box:
public class AboutDialog {
private Shell parent;
private Shell dialog;
public AboutDialog (Shell shell) {
super();
parent = shell;
}
public boolean open () {
final boolean[] value = new boolean[1];
final Shell dialog = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
dialog.setLayout(new FillLayout());
dialog.setSize(500, 220);
dialog.setLocation(GUI.getCenter(dialog));
dialog.pack();
dialog.open();
while (!dialog.isDisposed()) {
if (!GUI.display.readAndDispatch())
GUI.display.sleep();
}
return value[0];
}
}
Hope someone can help me out here,
Thanks, Sebastian
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03898 seconds