Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Disabling The RESIZING of a WINDOW
Disabling The RESIZING of a WINDOW [message #267777] Fri, 16 January 2009 13:51 Go to next message
adithya  is currently offline adithya Friend
Messages: 77
Registered: July 2009
Member
Hi..I am developing an editor using SWT/JFace and I am specifying the size
of the window using

getShell.setBounds(200,100,400,500);
getShell().setMaximized(false);
parent.pack();

but its not working.

I don't want the user to maximize the window i.e. I want the size to be
what I have decided..How do I do this??
Re: Disabling The RESIZING of a WINDOW [message #267805 is a reply to message #267777] Fri, 16 January 2009 21:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 1/16/2009 8:51 AM, adithya wrote:
> Hi..I am developing an editor using SWT/JFace and I am specifying the
> size of the window using
> getShell.setBounds(200,100,400,500);
> getShell().setMaximized(false);
> parent.pack();
>
> but its not working.
>
> I don't want the user to maximize the window i.e. I want the size to be
> what I have decided..How do I do this??
>

When you create the shell, what style bits (int argument) are you
passing to the constructor?
See the class Javadoc under the title "Styles:" for what bits can be
used and then look in the SWT class for their meanings.

Hope this helps,
Eric
Re: Disabling The RESIZING of a WINDOW [message #267809 is a reply to message #267805] Sat, 17 January 2009 11:42 Go to previous messageGo to next message
adithya  is currently offline adithya Friend
Messages: 77
Registered: July 2009
Member
This is what i have done..

public class EditorTry7 extends ApplicationWindow
{
public EditorTry7()
{
super(null);
}

protected Control createContents(Composite parent)
{
getShell().setText("Graphical Editor ");

getShell().setBounds(200,100,600,400);
getShell().setMaximized(false);

//Add tabfolders and groups
GroupandTabfolder5 GT = new GroupandTabfolder5(parent);

parent.pack();
return parent;
}

public static void main(String args[])
{
EditorTry7 ET7 = new EditorTry7();
ET7.setBlockOnOpen(true);
ET7.open();

Display.getCurrent().dispose();


}

}

I dint get any option as Styles,as there is no argument in "open()"
method..
What should i do as to disable resizing.
Re: Disabling The RESIZING of a WINDOW [message #267828 is a reply to message #267809] Mon, 19 January 2009 21:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 1/17/2009 6:42 AM, adithya wrote:
> This is what i have done..
>
> public class EditorTry7 extends ApplicationWindow
> {
> public EditorTry7()
> {
> super(null);
> }
<snipped more code>
>
> I dint get any option as Styles,as there is no argument in "open()"
> method..
> What should i do as to disable resizing.
>

Look at your call to the super constructor; do you know why you're
passing null? Do you know the ramifications of doing so, instead of
passing in a Shell object?
Also look at the methods that ApplicationWindow inherits from Window,
specifically getShellStyle()/setShellStyle().
A little reading of the Javadoc and the source code will go a long way.

Eric
Re: Disabling The RESIZING of a WINDOW [message #267855 is a reply to message #267828] Tue, 20 January 2009 14:20 Go to previous message
adithya  is currently offline adithya Friend
Messages: 77
Registered: July 2009
Member
Thanks a lot !! ur suggestion helped! :-)
Previous Topic:bug with redundant null check warning?
Next Topic:Reports in PDF format
Goto Forum:
  


Current Time: Thu Apr 25 13:53:18 GMT 2024

Powered by FUDForum. Page generated in 0.08087 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top