The SWT Tree component uses its own Tree widget, if it is available, for example, in the case of Windows - it uses its own widget located in Linux (depending on the user interface mechanism used), it can create its own tree on its own.
On an OS where it uses its own Tree widget, it is not possible to configure the + and - icons.
As Ali suggested (see http://msdn.microsoft.com/en-us/library/bb773568%28VS.85%29.aspx ), you can use TVE_EXPANDPARTIAL , but keep in mind that the code will depend on the OS ( even on Windows versions).
You may, however, wish to use a custom image β using the getImage() method in TreeContentProvider to specify otherwise, rather than relying on TVE_EXPANDPARTIAL . It also ensures that your code is OS independent.
Gaurav vaish
source share