Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 21:13 Go to next message
Steve Viens is currently offline Steve ViensFriend
Messages: 13
Registered: July 2009
Junior Member
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 22:02 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
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 22:54 Go to previous messageGo to next message
Steve Viens is currently offline Steve ViensFriend
Messages: 13
Registered: July 2009
Junior Member
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 23:19 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
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 16:25 Go to previous message
Steve Viens is currently offline Steve ViensFriend
Messages: 13
Registered: July 2009
Junior Member
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 12:38]

Report message to a moderator

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


Current Time: Fri Apr 19 23:34:27 GMT 2024

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

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

Back to the top