Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How to let Table specify different alighment for one column and its cells
How to let Table specify different alighment for one column and its cells [message #466165] Tue, 03 January 2006 15:16 Go to next message
Cliff Liang is currently offline Cliff LiangFriend
Messages: 24
Registered: July 2009
Junior Member
Hi,

I want to create one table, which has different alignment for column and its
cells like the following:

Name | Age |
--------------------------------------------
Tom | 12|

The second column has center alignment and its cells has right alignment.

I wrote the following

layout.addColumnData(new ColumnWeightData(10));
tc = new TableColumn(table, SWT.RIGHT);
tc.setText("Payout");

and cannot find a way to specify different alignment. Is it possible to do
so in SWT?

Thanks!

Cliff Liang
Re: How to let Table specify different alighment for one column and its cells [message #466288 is a reply to message #466165] Thu, 05 January 2006 20:55 Go to previous message
Veronika Irvine is currently offline Veronika IrvineFriend
Messages: 1272
Registered: July 2009
Senior Member
In SWT the column header and column data always have the same alignment.

"Cliff Liang" <cliff.liang@benisoft.com> wrote in message
news:dpfjai$rf9$1@utils.eclipse.org...
> Hi,
>
> I want to create one table, which has different alignment for column and
> its cells like the following:
>
> Name | Age |
> --------------------------------------------
> Tom | 12|
>
> The second column has center alignment and its cells has right alignment.
>
> I wrote the following
>
> layout.addColumnData(new ColumnWeightData(10));
> tc = new TableColumn(table, SWT.RIGHT);
> tc.setText("Payout");
>
> and cannot find a way to specify different alignment. Is it possible to do
> so in SWT?
>
> Thanks!
>
> Cliff Liang
>
Previous Topic:Text mimum width and SWT.H_SCROLL
Next Topic:printing in gtk?
Goto Forum:
  


Current Time: Fri Apr 26 03:37:49 GMT 2024

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

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

Back to the top