Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Which Layout for this question.
Which Layout for this question. [message #988209] Wed, 28 November 2012 19:52 Go to next message
drew frantz is currently offline drew frantzFriend
Messages: 340
Registered: July 2009
Senior Member
Just want to place a single Text control in a Composite the occupies the
entire composite and stretches to fit when the composite is resized. Seems
simple, but I cannot figure out the magic.
Re: Which Layout for this question. [message #988260 is a reply to message #988209] Thu, 29 November 2012 07:46 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
You can try it like this:
Composite composite = new Composite(parent, SWT.None);
composite.setLayout(new FillLayout());
Text text = new Text(composite, SWT.BORDER | SWT.MULTI);

or like this
Composite composite = new Composite(parent, SWT.None);
composite.setLayout(new GridLayout());
Text text = new Text(composite, SWT.BORDER | SWT.MULTI);
text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

Hope this helps.
christoph
Previous Topic:visible children of ScrolledComposite
Next Topic:Periodic job with UI interaction on eclipse plugin
Goto Forum:
  


Current Time: Mon May 13 14:15:26 GMT 2024

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

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

Back to the top