Skip to main content



      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 10:16 Go to next message
Eclipse UserFriend
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 15:55 Go to previous message
Eclipse UserFriend
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: Tue Jul 08 05:57:36 EDT 2025

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

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

Back to the top