|SWT Table [message #463148]
||Fri, 28 October 2005 00:16
Originally posted by: davidyoung_2001.yahoo.co.uk|
Is it possible to setWeights to define the relative sizes of colums in a
table? Also when I have added colums, there is a space to right hand side
that is undefined, how do I get the colums to absorb this space?
|Re: SWT Table [message #463189 is a reply to message #463183]
||Fri, 28 October 2005 18:46
Originally posted by: friederich.kupzog.de|
given your Table object is called table:
table.getSize().x gives you the width your columns can use.
Hope that helped,
david young wrote:
> Thanks Yves - how do I find out the size of the composite area, so that
> I can implement relative sizes?
Elektronik & Software
Neusser Str. 5-7
Tel 0241 160696-1
Fax 0221 726670
|Re: SWT Table [message #463205 is a reply to message #463148]
||Sun, 30 October 2005 13:54
| Sebastian Machhausen
Registered: July 2009
my antecessor already proposed some good advice on this topic. I just wanted to add another option to address this problem. I always handle it this way:
1) Define a default width for all table columns
2) Add the user option to resize all colums that way that they adopt the width of the widest cell by using <i>TableColumn.pack()</i>. Add an accelerator for this as done in windows explorer (ctrl + plus) for example.
I switched to this solution since it doesn't restrict the user so much. Experience taught me that many users do not want a table to auto resize as the enclosing component, e.g. the window is resized.
Powered by FUDForum
. Page generated in 0.01675 seconds