Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Hide/Show a TreeColumn in a Tree
Hide/Show a TreeColumn in a Tree [message #332806] Mon, 10 November 2008 16:15 Go to next message
Glenn Dollard is currently offline Glenn DollardFriend
Messages: 61
Registered: July 2009
Member
Hi All,

I have a TreeViewer with a few TreeColumns assigned.
Can anyone point me in the direction of finding out how to implement the
ability to toggle between hiding one particular
TreeColumn and making it visible again?

I want the user to be able to view/hide the last TreeColumn in the Tree.

Any ideas please?

Thanks in advance!!
Re: Hide/Show a TreeColumn in a Tree [message #332808 is a reply to message #332806] Mon, 10 November 2008 16:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse-news.rizzoweb.com

On 11/10/2008 11:15 AM, gdollard wrote:
> Hi All,
>
> I have a TreeViewer with a few TreeColumns assigned.
> Can anyone point me in the direction of finding out how to implement the
> ability to toggle between hiding one particular
> TreeColumn and making it visible again?
>
> I want the user to be able to view/hide the last TreeColumn in the Tree.
>
> Any ideas please?

I think you can just can set the column's width to 0 to hide it.
The JFace snippets page
(http://wiki.eclipse.org/index.php/JFaceSnippets) has an example of
showing/hiding columns with a nifty animation effect (Snippet 017).

Hope this helps,
Eric
Re: Hide/Show a TreeColumn in a Tree [message #332838 is a reply to message #332808] Tue, 11 November 2008 07:18 Go to previous messageGo to next message
Glenn Dollard is currently offline Glenn DollardFriend
Messages: 61
Registered: July 2009
Member
Thanks, yeah I was looking briefly at that snippet but I guessed that just
setting it's width to zero would
have a [what would seem] weird affect on tabbing etc.

But I will give it a try anyway!

Thanks again.

"Eric Rizzo" <eclipse-news@rizzoweb.com> wrote in message
news:gf9n4n$jsv$1@build.eclipse.org...
> On 11/10/2008 11:15 AM, gdollard wrote:
>> Hi All,
>>
>> I have a TreeViewer with a few TreeColumns assigned.
>> Can anyone point me in the direction of finding out how to implement the
>> ability to toggle between hiding one particular
>> TreeColumn and making it visible again?
>>
>> I want the user to be able to view/hide the last TreeColumn in the Tree.
>>
>> Any ideas please?
>
> I think you can just can set the column's width to 0 to hide it.
> The JFace snippets page (http://wiki.eclipse.org/index.php/JFaceSnippets)
> has an example of showing/hiding columns with a nifty animation effect
> (Snippet 017).
>
> Hope this helps,
> Eric
Re: Hide/Show a TreeColumn in a Tree [message #332847 is a reply to message #332838] Tue, 11 November 2008 08:45 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
gdollard schrieb:
> Thanks, yeah I was looking briefly at that snippet but I guessed that just
> setting it's width to zero would
> have a [what would seem] weird affect on tabbing etc.

Since 3.4 (3.4.1) we handle this correctly.

>
> But I will give it a try anyway!

If it doesn't work it is bug but I'm 99.9% sure it works.

Tom

--
B e s t S o l u t i o n . at
------------------------------------------------------------ --------
Tom Schindl JFace-Committer
------------------------------------------------------------ --------
Previous Topic:Replace List in ElementListSelectionDialog by Table?
Next Topic:Open editor and parent IFolder rename
Goto Forum:
  


Current Time: Sat Apr 27 02:33:13 GMT 2024

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

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

Back to the top