Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to define each column's width in a GridLayout?
How to define each column's width in a GridLayout? [message #465455] Wed, 14 December 2005 06:35 Go to next message
Eclipse UserFriend
Originally posted by: Soniclee.ustc.edu

Hi everybody:
I use a GridLayout in my wizard page to put some widget, a List e.g.
But the List looks too narrow to display the String in it.
So, How can I define the width of each column in a GridLayout? I can't
find a method to deal with this.
Thanks a lot!
Sonic
Re: How to define each column's width in a GridLayout? [message #465458 is a reply to message #465455] Wed, 14 December 2005 10:46 Go to previous message
Eclipse UserFriend
Originally posted by: Merle.Evelyne.ordirope.com

Look at GridData class and setLayoutData method.

GridData gd = new GridData();
gd.widthHint = 100;
myList.setLayoutData(gd);

Important : use a new GridData for each widget you want to apply
setLayoutData.


"Soniclee" <Soniclee@ustc.edu> a
Previous Topic:Adding a scroll to the Composite widget
Next Topic:SWT List/Text slow....
Goto Forum:
  


Current Time: Wed Apr 24 21:01:33 GMT 2024

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

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

Back to the top