|
|
Re: stop swt window resizing [message #464566 is a reply to message #464237] |
Thu, 24 November 2005 22:27 |
Eclipse User |
|
|
|
Originally posted by: mwilli.iastate.edu
Are you trying to stop resizing altogether or just make it stop after it
gets to a certain size? I don't know of an easy way to stop it after it gets
to a certain size, but you can set a minimum size, a preferred size, and set
resize to false. Take a look at the following snippet:
Shell window = new Shell();
window.setSize(400,400);
window.setResizeable(false);
That will keep the window at 400x400
"Andrew Holland" <a1dutch@dsl.pipex.com> wrote in message
news:dllf9k$hjp$1@news.eclipse.org...
> does anyone know how to stop an swt window resizing?
>
> i've use this code below which stops it but still alows the arrows on the
> sides and cornersL -
>
> Listener listener = new Listener () {
>
>
> public void handleEvent (Event e) {
> switch (e.type) {
> case SWT.Resize:
> optionsShell.setSize(400,400);
> System.out.println ("Resize received");
> break;
> case SWT.Paint:
> System.out.println ("Paint received");
> break;
> default:
> System.out.println ("Unknown event received");
> }
> }
> };
> optionsShell.addListener (SWT.Resize, listener);
> optionsShell.addListener (SWT.Paint, listener);
>
>
> can anyone provide any better examples or prompt me in the right
> direction,
>
> thanks
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04122 seconds