Skip to main content


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] Thu, 19 August 2010 02:07 Go to next message
Stumppi is currently offline StumppiFriend
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 06:39 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
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 14:43 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
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 11:35 Go to previous messageGo to next message
Parvez Ahmad Ahmad is currently offline Parvez Ahmad AhmadFriend
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 20:09 Go to previous message
Michael Meier is currently offline Michael MeierFriend
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 21:25]

Report message to a moderator

Previous Topic:TreeViewer's inputChanged method is not called?
Next Topic:What do chars like % or $ mean
Goto Forum:
  


Current Time: Fri Mar 29 02:38:15 GMT 2024

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

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

Back to the top