Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to remove window border / margin
How to remove window border / margin [message #486006] Tue, 15 September 2009 17:13 Go to next message
Eclipse UserFriend
I'm writing an RCP application that will be deployed to Vista and screen
real estate is at a premium so I'd like to eliminate any unneccessary
border. I can't seem to eliminate this 5 pixel border around my primarly
Composite ... see the image below for what I mean...

http://www.viens.net/rcp/cti.jpg

You can see the line that's in between the window frame and the enclosed
Composite. Would like to get rid of that if it's possible.

Any help would be appreciated.

Thanks,
Steve
Re: How to remove window border / margin [message #486012 is a reply to message #486006] Tue, 15 September 2009 18:02 Go to previous messageGo to next message
Eclipse UserFriend
On Tue, 15 Sep 2009 21:13:58 +0000, Steve Viens wrote.
> I can't seem to eliminate this 5 pixel border around my primarly
> Composite ... see the image below for what I mean...
>
> http://www.viens.net/rcp/cti.jpg

Probably because of your layout. Could just use a FillLayout I suppose.
Alternatively, show the code being used in question. If it's a GridLayout
you need to set the margins to zero.

Regards,
Remy
Re: How to remove window border / margin [message #486024 is a reply to message #486012] Tue, 15 September 2009 18:54 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply.

I thought it might be the layout too but the following createPartControl()
method in my View doesn't seem to have any effect.

/**
* This is a callback that will allow us to create
* the viewer and initialize it.
*/
public void createPartControl(Composite parent) {
GridLayout gridLayout = new GridLayout();
gridLayout.horizontalSpacing = 0;
gridLayout.verticalSpacing = 0;
gridLayout.marginWidth = 0;
gridLayout.marginHeight = 0;
parent.setLayout(gridLayout);
}

It seems as though the border is part of the window.

Steve
Re: How to remove window border / margin [message #486026 is a reply to message #486024] Tue, 15 September 2009 19:19 Go to previous messageGo to next message
Eclipse UserFriend
On Tue, 15 Sep 2009 22:54:46 +0000, Steve Viens wrote:
> It seems as though the border is part of the window.

Likely. It could be the work of the TrimLayout.
org.eclipse.ui.internal.layout.TrimLayout

Regards,
Remy
Re: How to remove window border / margin [message #486186 is a reply to message #486026] Wed, 16 September 2009 12:25 Go to previous message
Eclipse UserFriend
Thanks, I think you're right about the TrimLayout. Unfortunately
(after messing with this for 4 hours) there doesn't seem to be a way to
adjust the size of the trim any longer. There were public
setMargin methods in an earlier version of the API but
they do not seem to be available in 3.4. :(

Steve

[Updated on: Thu, 17 September 2009 08:38] by Moderator

Previous Topic:Saving editor layout
Next Topic:listening to resource changes caused by team synchronization
Goto Forum:
  


Current Time: Mon Jul 07 15:06:38 EDT 2025

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

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

Back to the top