Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem with checkbox
TreeItem with checkbox [message #450861] Fri, 18 February 2005 17:26 Go to next message
ivan is currently offline ivanFriend
Messages: 2
Registered: July 2009
Junior Member
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
Re: TreeItem with checkbox [message #450867 is a reply to message #450861] Fri, 18 February 2005 18:40 Go to previous message
Tiberiu Caprita is currently offline Tiberiu CapritaFriend
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
Previous Topic:GridLayout not using all columns on every row
Next Topic:using a JPanel in an SWT application
Goto Forum:
  


Current Time: Wed Apr 24 21:36:06 GMT 2024

Powered by FUDForum. Page generated in 0.02628 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top