How to stop expanding an infinite SWT Tree upon pressing "*"
Posted
by Lóránt Pintér
on Stack Overflow
See other posts from Stack Overflow
or by Lóránt Pintér
Published on 2010-06-10T13:19:13Z
Indexed on
2010/06/10
13:22 UTC
Read the original article
Hit count: 255
I have an SWT Tree in my application that contains an infinite data structure. Upon expanding an item, I generate its children. On Windows though, users can press "*", triggering an "expand all descendants" action, and my application hangs.
There are two acceptable behaviors for me when the user presses "*":
- Expand all children of the selected element, but only to the next level
- Do nothing
In either case, I will still need to be able to expand items as deep as required (by clicking on the [+] icon, or by pressing "+"), so limiting the tree depth is not a solution. Is there another way that I can achieve either of the above without modifying SWT classes?
© Stack Overflow or respective owner