Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] How do you remove trim from SWT_AWT Shell


You should delete this line (it does not make sense):
shell.setLayoutData(new FillLayout());

Alternatively, you can just go with this code:
shell = SWT_AWT.new_Shell(FlexIntegration.getDisplay(), canvas);
shell.setLayout(new FillLayout());

For more fun with layout code, see: http://www.eclipse.org/articles/article.php?file=Article-Understanding-Layouts/index.html

Carolyn


From: J- MAN <jmandawg@xxxxxxxxxxx>
To: <platform-swt-dev@xxxxxxxxxxx>
Date: 12/04/2011 02:51 PM
Subject: Re: [platform-swt-dev] How do you remove trim from SWT_AWT Shell
Sent by: platform-swt-dev-bounces@xxxxxxxxxxx






Sorry for posting, i figured it out.  I'm a total noob when it comes to swt.

shell = SWT_AWT.new_Shell(FlexIntegration.getDisplay(), canvas);
GridLayout gl = new GridLayout();
gl.marginWidth = 0;
gl.marginHeight = 0;
shell.setLayout(gl);
shell.setLayoutData(new FillLayout());

----------------------------------------
> From: jmandawg@xxxxxxxxxxx
> To: platform-swt-dev@xxxxxxxxxxx
> Subject: RE: How do you remove trim from SWT_AWT Shell
> Date: Tue, 12 Apr 2011 14:36:34 -0400
>
>
> Sorry. To be more clear, there is a 4 pixel padding around the shell object.  Here is a screen shot and the corresponding code:
>
> (Screenshot URL)
>
http://i.imgur.com/1vUFv.jpg
>
> JDialog Parent = new JDialog();
> parent.getContentPane().add(canvas,BorderLayout.CENTER);
> parent.setVisible(true);
>
> shell = SWT_AWT.new_Shell(FlexIntegration.getDisplay(), canvas);
>
> shell.setBackground(new org.eclipse.swt.graphics.Color(display, new RGB(255 ,0, 0)));
> shell.setLayout(new GridLayout());
> shell.setLayoutData(new FillLayout());
>
> browser = new Browser(shell, SWT.NONE);
> browser.setLayoutData(new GridData(GridData.FILL_BOTH));
> browser.setUrl("
http://www.google.com");
> shell.pack();
> shell.open();
>
>
>
> ----------------------------------------
> > From: jmandawg@xxxxxxxxxxx
> > To: platform-swt-dev@xxxxxxxxxxx
> > Subject: How do you remove trim from SWT_AWT Shell
> > Date: Tue, 12 Apr 2011 13:24:21 -0400
> >
> >
> > Hi All,
> >
> > Is there anyway to remove the trim from an SWT_AWT Shell?
> >
> > shell = SWT_AWT.new_Shell(display, canvas);
> >
> > There is no options to set the style to SWT_NOTRIM. Right now i have a 4 pixel border around the entire shell.
> >
> > Thanks,
> >
> > J
> >
>
                                                                                           
_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



Back to the top