Hide/Show a TreeColumn in a Tree [message #332806] |
Mon, 10 November 2008 16:15  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
------------------------------------------------------------ --------
|
|
|
Powered by
FUDForum. Page generated in 0.45470 seconds