Skip to main content



      Home
Home » Eclipse Projects » JFace » checkbox state change (checked-grayed-unchecked) logic in CheckboxTreeviewer
checkbox state change (checked-grayed-unchecked) logic in CheckboxTreeviewer [message #486130] Wed, 16 September 2009 09:27 Go to next message
Eclipse UserFriend
hello,
I am using checkboxtreeviewer in my application. I want it to behave like
other checkbox trees in Eclipse IDE. When user checks parent checkbox, all
its child item checkboxes should get checked, if any child item is
checked, its parent item should get grayed and when all the child items
are checked then parent should get automatically checked and so on.

I thought this feature should be available ready made in
checkboxtreeviewer, but sadly, its not :(

can you help me have above mentioned functionality?

Thanks in advance,
Amay.
Re: checkbox state change (checked-grayed-unchecked) logic in CheckboxTreeviewer [message #486258 is a reply to message #486130] Wed, 16 September 2009 18:24 Go to previous messageGo to next message
Eclipse UserFriend
On Wed, 16 Sep 2009 13:27:05 +0000, amay wrote:
> I am using checkboxtreeviewer in my application. I want it to behave
> like other checkbox trees in Eclipse IDE. When user checks parent
> checkbox, all its child item checkboxes should get checked, if any child
> item is checked, its parent item should get grayed and when all the
> child items are checked then parent should get automatically checked and
> so on.

I think you want ContainerCheckedTreeViewer?
http://help.eclipse.org/stable/nftopic/org.eclipse.platform. doc.isv/
reference/api/org/eclipse/ui/dialogs/ContainerCheckedTreeVie wer.html

Regards,
Remy
Re: checkbox state change (checked-grayed-unchecked) logic in CheckboxTreeviewer [message #486270 is a reply to message #486258] Thu, 17 September 2009 00:34 Go to previous message
Eclipse UserFriend
Remy Suen wrote:

> On Wed, 16 Sep 2009 13:27:05 +0000, amay wrote:
>> I am using checkboxtreeviewer in my application. I want it to behave
>> like other checkbox trees in Eclipse IDE. When user checks parent
>> checkbox, all its child item checkboxes should get checked, if any child
>> item is checked, its parent item should get grayed and when all the
>> child items are checked then parent should get automatically checked and
>> so on.

> I think you want ContainerCheckedTreeViewer?
> http://help.eclipse.org/stable/nftopic/org.eclipse.platform. doc.isv/
> reference/api/org/eclipse/ui/dialogs/ContainerCheckedTreeVie wer.html

> Regards,
> Remy

Thank you Remy,
This is exactly what I wanted.

-amay.
Previous Topic:How To Tie A Toolbar Button To A Specific Perspective?
Next Topic:Databinding text to model
Goto Forum:
  


Current Time: Wed Jul 23 11:39:00 EDT 2025

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

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

Back to the top