|
Re: Preventing TreeItem to expand/collapse [message #553717 is a reply to message #549916] |
Wed, 18 August 2010 14:36 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
Hi, sorry for the late reply,
There isn't a way to veto an expand/collapse by the user, other than to
listen for the Expand/Collapse event and invoke the opposite API to
re-expand/re-collapse the item, which can show a flash.
I could not find existing Feature Requests for a better way to do this, so
if you want you can log one or two with swt at
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform
&component=SWT&bug_severity=enhancement .
Grant
"Albert" <albert.pikus@gmail.com> wrote in message
news:i2p9oj$v7s$1@build.eclipse.org...
> Hi, everybody,
>
> I wonder if it is possible to prevent TreeItem to expand/collapse when
> [+]/[-] is clicked. Setting event.doit to false doesn't work.
> I tried to prevent expanding/collapsing with both typed listener
> (TreeListener) and untyped listener, but with no success.
>
>
> Any advise would be greatly appreciated.
>
>
> Best regards,
>
> Albert
>
|
|
|
Re: Preventing TreeItem to expand/collapse [message #555092 is a reply to message #549916] |
Wed, 25 August 2010 12:48 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
Pls do follow what Grant suggested...
At many places, i also needed such functionality but then again i found that by default these type of functionalities are not there in the OS controls for a reason..
Its like this,why would any body would have a tree with expandable tree element and dont want to expand it,if he dont want to expand any element of the tree, then he would desable the tree control,if he does not want a single element to be expanded ,then wouldnt it be better to show it without children...
it all depends on your business logic....
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
|
Powered by
FUDForum. Page generated in 0.04461 seconds