|
Re: TreeItem with checkbox [message #450867 is a reply to message #450861] |
Fri, 18 February 2005 18:40 |
Tiberiu Caprita Messages: 68 Registered: July 2009 |
Member |
|
|
ivan wrote:
> Hi all!
> I would like to create a Tree that uses TreeItems with Checkboxes. But in
> particular I want that only SOME TreeItems have the Checkboxes, while the
> others remain with NO Checkboxes. I have seen that it is possible to
> create a Tree that extends the CheckBox option to the entire Tree. Isn't
> possible to assign the Chechbox option locally (i.e. decide for every
> TreeItem whether it has this otion or not)?
> Thanks,
> ivan
Hi Ivan,
I don't think you can show only for some TreeItems CheckBoxes, using
SWT.CHECK option.
What you can is quite easy:
1. Don't allowing the check some TreeItems (in a checkLister()), take a
look there are already some posted things).
2. If your Tree doesn't need Icons, use for the TreeItems you need 2
Icons, one for Check, one for Uncheck, and add a Mouse listener in order
to find if someone "is checking" your Icon.
Regards,
Tiberiu
|
|
|
Powered by
FUDForum. Page generated in 0.02628 seconds