Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » TreeItem with checkbox
TreeItem with checkbox [message #450861] Fri, 18 February 2005 12:26 Go to next message
Eclipse UserFriend
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 13:40 Go to previous message
Eclipse UserFriend
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 Jul 23 21:50:17 EDT 2025

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

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

Back to the top