Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How can I associate custom widgets with TreeItems in SWT?
How can I associate custom widgets with TreeItems in SWT? [message #1095823] Tue, 27 August 2013 11:27 Go to next message
Stefan C is currently offline Stefan C
Messages: 2
Registered: August 2013
Junior Member
I have created a custom widget--an SWT Group that consists of several buttons, labels, images and perhaps several other widgets I might need to add in the future. I would like to make this custom widget a tree item, so that I can get the indentation and the expand/collapse functionality of a tree.

Here is an example that shows what I am trying to achieve. This example was created with GWT.

index.php/fa/16052/0/


The SWT TreeItem has methods to set the text and the image, but I could not find a way to make the tree item be a custom widget. If there it is not possible to associate custom widgets with SWT tree items, suggestions about other ways to organize custom widgets in a tree with indentation and expand/collapse functionality would be very helpful too. Thanks!


Stef
Re: How can I associate custom widgets with TreeItems in SWT? [message #1098082 is a reply to message #1095823] Fri, 30 August 2013 11:35 Go to previous messageGo to next message
Mickael Istria is currently offline Mickael Istria
Messages: 720
Registered: July 2009
Location: Grenoble, France
Senior Member
Maybe you can use recursively a PGroup
http://www.eclipse.org/nebula/widgets/pgroup/pgroup.php ?
It seems to me that PGroup allow any kind of widget when expanded.

HTH
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
Re: How can I associate custom widgets with TreeItems in SWT? [message #1109147 is a reply to message #1098082] Sat, 14 September 2013 20:47 Go to previous message
Stefan C is currently offline Stefan C
Messages: 2
Registered: August 2013
Junior Member
Thank you, Mickael! I tried out the PGroup and it seems that it is a good approach to implement the things described in the original post.

Stef
Previous Topic:Border around Image Button
Next Topic:CheckboxTableViewer with more than 2 columns?
Goto Forum:
  


Current Time: Wed Apr 16 03:20:59 EDT 2014

Powered by FUDForum. Page generated in 0.02209 seconds