Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Hide/Show column
Hide/Show column [message #450611] Wed, 16 February 2005 09:57 Go to next message
Eclipse UserFriend
Originally posted by: swt.anderlecht-online.be

Hi,

Is it possible to hide and show columns with swt?
Or would I better use swing?

Thx in advance

Pieter
Re: Hide/Show column [message #450612 is a reply to message #450611] Wed, 16 February 2005 10:33 Go to previous messageGo to next message
Peter Goetz is currently offline Peter GoetzFriend
Messages: 38
Registered: July 2009
Member
Pieter Vunckx wrote:
> Hi,

Hi,

>
> Is it possible to hide and show columns with swt?
> Or would I better use swing?

We have set the width of the column to 0, that worked fine.
To set it invisible is not possible in SWT, as far as I know.

>
> Thx in advance

Hope it helps.

>
> Pieter

Peter

>
Re: Hide/Show column [message #450614 is a reply to message #450612] Wed, 16 February 2005 11:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: swt.anderlecht-online.be

thx for that tip Peter!

But I'm having @ the moment probs with setInput ( .. ) :(
I'm going to try to explain my situation...

tv.setInput(lijst);
tv = TableViewer
list = ArrayList with Person-objects (1 row in table = 1 Person)

but he gives an error on that setInput line ... :S
java.lang.ClassCastException

What kind of 'thing' is the argument of setInput ? 'an object' ... :S

Thx in advance !!!!!

Pieter




Peter Goetz wrote:

> Pieter Vunckx wrote:
>> Hi,

> Hi,

>>
>> Is it possible to hide and show columns with swt?
>> Or would I better use swing?

> We have set the width of the column to 0, that worked fine.
> To set it invisible is not possible in SWT, as far as I know.

>>
>> Thx in advance

> Hope it helps.

>>
>> Pieter

> Peter

>>
Re: Hide/Show column [message #450637 is a reply to message #450614] Wed, 16 February 2005 12:33 Go to previous message
Peter Goetz is currently offline Peter GoetzFriend
Messages: 38
Registered: July 2009
Member
Pieter Vunckx wrote:
> [...]
> tv.setInput(lijst);
> tv = TableViewer
> list = ArrayList with Person-objects (1 row in table = 1 Person)
>
> but he gives an error on that setInput line ... :S
> java.lang.ClassCastException
>
> What kind of 'thing' is the argument of setInput ? 'an object' ... :S
>

The Input is the - usually list of - domain objects that should be
displayed. You have to be sure that the ContentProvider and
LabelProvider are able to handle these objects.
You could have a look at the article "How to use the JFace Tree Viewer"
at http://eclipse.org/articles/index.html.
It is similar with a TableViewer.
I'm not so firm with the viewer stuff, so I'm sorry I'm no real help there.

Peter
Previous Topic:mask in text control
Next Topic:Freeze Table Columns
Goto Forum:
  


Current Time: Thu Apr 25 11:20:18 GMT 2024

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

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

Back to the top