Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Why one additional column / row in TableViewer?
Why one additional column / row in TableViewer? [message #553820] Wed, 18 August 2010 22:07 Go to next message
Stumppi is currently offline Stumppi
Messages: 11
Registered: July 2010
Junior Member
Hi,

I am using TableViewer, adding some data, looks great. However, there is one addtional (empty) column and one additional (empty) row shown? Why is that and how can I get rid of it?

Thanks! Stumppi
Re: Why one additional column / row in TableViewer? [message #553833 is a reply to message #553820] Thu, 19 August 2010 02:39 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5281
Registered: July 2009
Senior Member
On win32 you always get an artifical column if you don't fill the
complete space and if you are not using the complete height you have
empty "rows" showing up at the bottom.

You can get rid of the empty column by making your columns fit the width
of the table-widget.

Tom

Am 19.08.10 04:07, schrieb Stumppi:
> Hi,
> I am using TableViewer, adding some data, looks great. However, there is
> one addtional (empty) column and one additional (empty) row shown? Why
> is that and how can I get rid of it?
>
> Thanks! Stumppi
Re: Why one additional column / row in TableViewer? [message #554216 is a reply to message #553833] Fri, 20 August 2010 10:43 Go to previous messageGo to next message
Grant Gayed is currently offline Grant Gayed
Messages: 2148
Registered: July 2009
Senior Member
Also, space is reserved for showing the scrollbars when they're needed. If
you are confident that your content will never be longer and/or wider than
the Table's bounds (in which case one or both scrollbars will never be
needed) then you can create your Table with style SWT.NO_SCROLL. Or if you
only want a vertical scrollbar then use SWT.NO_SCROLL | SWT.V_SCROLL.

Grant


"Tom Schindl" <tom.schindl@bestsolution.at> wrote in message
news:i4ijia$hqh$2@build.eclipse.org...
> On win32 you always get an artifical column if you don't fill the
> complete space and if you are not using the complete height you have
> empty "rows" showing up at the bottom.
>
> You can get rid of the empty column by making your columns fit the width
> of the table-widget.
>
> Tom
>
> Am 19.08.10 04:07, schrieb Stumppi:
>> Hi,
>> I am using TableViewer, adding some data, looks great. However, there is
>> one addtional (empty) column and one additional (empty) row shown? Why
>> is that and how can I get rid of it?
>>
>> Thanks! Stumppi
>
Re: Why one additional column / row in TableViewer? [message #644442 is a reply to message #553833] Sat, 11 December 2010 06:35 Go to previous messageGo to next message
Parvez Ahmad Hakim is currently offline Parvez Ahmad Hakim
Messages: 31
Registered: May 2010
Member
I do not that is correct solution .
Can you post some sample code

My code was
int columnWidth[] = { 250, 80, 80 };

for (int i = 0; i < columnName.length; i++) {
TableColumn column = new TableColumn(this.getTable(), SWT.NONE);
column.setWidth(columnWidth[i]);

Is there some way not to mention the width so that it is taken automatically and fills all

regards
Parvez Ahmad Hakim
Srinagar Kashmir
Re: Why one additional column / row in TableViewer? [message #1255767 is a reply to message #644442] Mon, 24 February 2014 15:09 Go to previous message
Michael Meier is currently offline Michael Meier
Messages: 1
Registered: February 2014
Junior Member
I solved a part of the problem by reading this:
http javafact.com/2010/07/26/working-with-jface-tableviewer

Now there isn't an empty blank additional extra column.

But how to get rid of the empty blank additional extra row???

Edit: And now I have the problem that if I resize the table I have no scrollbars.

[Updated on: Mon, 24 February 2014 16:25]

Report message to a moderator

Previous Topic:TreeViewer vs TableViewer
Next Topic:Resizable non modal dialog
Goto Forum:
  


Current Time: Thu Aug 21 22:15:20 EDT 2014

Powered by FUDForum. Page generated in 0.01870 seconds