Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » setting margin for the nested composite.
setting margin for the nested composite. [message #483546] Wed, 02 September 2009 02:33
caesar  is currently offline caesar Friend
Messages: 6
Registered: July 2009
Junior Member
I have an editor extending FormEditor. I am trying to set some margin inside a nested composite. I see some margin at the top when I open, but when I move a vertical bar, the margin disappears. Could anybody tell me what the problem is? I am just trying to add some margin at the left and top for the nested composite.

Any workaround would be appreciated as well. I am pretty new to the eclipse UI.

	    Composite parent = getContainer();
	    int editorWidth = 700;
	    int editorHeight = 700;
	    
	    final ScrolledComposite scomposite = new ScrolledComposite(parent, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	    Color whiteColor = new Color(scomposite.getDisplay(), 255, 255, 255);
	    scomposite.setBackground(whiteColor);
	    scomposite.setAlwaysShowScrollBars(true);

	    final Composite composite = new Composite(scomposite, SWT.NONE);
	    Color backgroundColor = new Color(composite.getDisplay(), 246, 160, 11);
	    scomposite.setContent(composite);
	    composite.setLocation(30, 20);
	    composite.setLayout(null);
	    composite.setSize(editorWidth, editorHeight);
	    composite.setBackground(backgroundColor);



Thanks.
Previous Topic:Page Breaks for StyledText
Next Topic:display.getClientArea is incorrect (gtk)
Goto Forum:
  


Current Time: Sat Aug 24 03:02:00 GMT 2019

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

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

Back to the top