Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » The first column is too wide
The first column is too wide [message #441682] Thu, 19 August 2004 17:57 Go to next message
Eclipse UserFriend
Originally posted by: andrej.litowka.impulsus.de

Hi All,

I try to adjust a column wide in a table to a column name:

for (int j = 1; j <= columnCnt; j++) {
TableColumn column = new TableColumn(resTable, SWT.RIGHT);
column.pack();
column.setText(...);
}

It works, but the first column is too wide. It looks like this:

|column1 |column2|another_column|one_more_column|
|17 | 329| 234| 45|

Can anybody tell me what do I wrong?

Thanks.
With best regards,
Andrej.
Re: The first column is too wide [message #441685 is a reply to message #441682] Thu, 19 August 2004 19:37 Go to previous messageGo to next message
Simone Gianni is currently offline Simone GianniFriend
Messages: 29
Registered: July 2009
Junior Member
Please check if this https://bugs.eclipse.org/bugs/show_bug.cgi?id=45429
or this https://bugs.eclipse.org/bugs/show_bug.cgi?id=25525 apply.

Ciao,
Simone Gianni


Andrej Litovka wrote:

> Hi All,
>
> I try to adjust a column wide in a table to a column name:
>
> for (int j = 1; j <= columnCnt; j++) {
> TableColumn column = new TableColumn(resTable, SWT.RIGHT);
> column.pack();
> column.setText(...);
> }
>
> It works, but the first column is too wide. It looks like this:
>
> |column1 |column2|another_column|one_more_column|
> |17 | 329| 234| 45|
>
> Can anybody tell me what do I wrong?
>
> Thanks.
> With best regards,
> Andrej.
>
Re: The first column is too wide [message #441688 is a reply to message #441685] Fri, 20 August 2004 07:01 Go to previous messageGo to next message
Benjamin Pasero is currently offline Benjamin PaseroFriend
Messages: 337
Registered: July 2009
Senior Member
Should'nt pack() be called after text has been set to the Column via
setText()?

> Please check if this https://bugs.eclipse.org/bugs/show_bug.cgi?id=45429
> or this https://bugs.eclipse.org/bugs/show_bug.cgi?id=25525 apply.

> Ciao,
> Simone Gianni


> Andrej Litovka wrote:

> > Hi All,
> >
> > I try to adjust a column wide in a table to a column name:
> >
> > for (int j = 1; j <= columnCnt; j++) {
> > TableColumn column = new TableColumn(resTable, SWT.RIGHT);
> > column.pack();
> > column.setText(...);
> > }
> >
> > It works, but the first column is too wide. It looks like this:
> >
> > |column1 |column2|another_column|one_more_column|
> > |17 | 329| 234| 45|
> >
> > Can anybody tell me what do I wrong?
> >
> > Thanks.
> > With best regards,
> > Andrej.
> >
Re: The first column is too wide [message #441769 is a reply to message #441688] Tue, 24 August 2004 16:45 Go to previous message
Eclipse UserFriend
Originally posted by: andrej.litowka.impulsus.de

Hi Benjamin!

Thank you for your answer. I tried to call pack() after setText(). It
didn't hel me. The column is even though to wide.

Benjamin Pasero wrote:

> Should'nt pack() be called after text has been set to the Column via
> setText()?

> > Please check if this https://bugs.eclipse.org/bugs/show_bug.cgi?id=45429
> > or this https://bugs.eclipse.org/bugs/show_bug.cgi?id=25525 apply.

> > Ciao,
> > Simone Gianni


> > Andrej Litovka wrote:

> > > Hi All,
> > >
> > > I try to adjust a column wide in a table to a column name:
> > >
> > > for (int j = 1; j <= columnCnt; j++) {
> > > TableColumn column = new TableColumn(resTable, SWT.RIGHT);
> > > column.pack();
> > > column.setText(...);
> > > }
> > >
> > > It works, but the first column is too wide. It looks like this:
> > >
> > > |column1 |column2|another_column|one_more_column|
> > > |17 | 329| 234| 45|
> > >
> > > Can anybody tell me what do I wrong?
> > >
> > > Thanks.
> > > With best regards,
> > > Andrej.
> > >
Previous Topic:[OT] Sending e-mail using default e-mail client
Next Topic:SWT tutorial at OOPSLA, October 24-28, 2004
Goto Forum:
  


Current Time: Fri Apr 19 04:00:29 GMT 2024

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

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

Back to the top