Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CheckedTreeSelectionDialog
CheckedTreeSelectionDialog [message #113801] Thu, 21 August 2003 13:50 Go to next message
James Willans is currently offline James WillansFriend
Messages: 303
Registered: July 2009
Senior Member
Hi,

I'm trying to provide dialog using:

org.eclipse.ui.dialogs.CheckedTreeSelectionDialog

whereby the user can select elements from a tree. Th selection aspect
works fine, however I'm having problems setting the initial state of the
tree when the user returns to the dialog. I have a list of previously
checked elements, taken using:

CheckboxTreeViewer cbtv = this.getTreeViewer();
Object[] allFilters = cbtv.getCheckedElements();

However when I try and reconfigure the tree with this selection, it
doesn't seem to work:

((CheckboxTreeViewer)this.getTreeViewer()).setCheckedElement s(allFilters);

No errors, no nothing.

Any help with this frustrating problem, much appreciated.

James
Re: CheckedTreeSelectionDialog [message #113898 is a reply to message #113801] Thu, 21 August 2003 14:43 Go to previous message
James Willans is currently offline James WillansFriend
Messages: 303
Registered: July 2009
Senior Member
Just to add, the method below does work for the root item of the tree.
But not for any of the sub branches.

James Willans wrote:

> Hi,

> I'm trying to provide dialog using:

> org.eclipse.ui.dialogs.CheckedTreeSelectionDialog

> whereby the user can select elements from a tree. Th selection aspect
> works fine, however I'm having problems setting the initial state of the
> tree when the user returns to the dialog. I have a list of previously
> checked elements, taken using:

> CheckboxTreeViewer cbtv = this.getTreeViewer();
> Object[] allFilters = cbtv.getCheckedElements();

> However when I try and reconfigure the tree with this selection, it
> doesn't seem to work:

> ((CheckboxTreeViewer)this.getTreeViewer()).setCheckedElement s(allFilters);

> No errors, no nothing.

> Any help with this frustrating problem, much appreciated.

> James
Previous Topic:Console window(s)
Next Topic:Project property page no longer exists...
Goto Forum:
  


Current Time: Sat Jul 13 02:45:41 GMT 2024

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

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

Back to the top