Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:27 Go to next message
amay is currently offline amayFriend
Messages: 13
Registered: July 2009
Junior Member
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 22:24 Go to previous messageGo to next message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
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 04:34 Go to previous message
amay is currently offline amayFriend
Messages: 13
Registered: July 2009
Junior Member
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: Tue Apr 23 17:19:57 GMT 2024

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

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

Back to the top