Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » dragging a TreeColumn
dragging a TreeColumn [message #733487] Tue, 04 October 2011 21:26 Go to next message
scb  is currently offline scb Friend
Messages: 43
Registered: July 2009
Member
Besides moving a TreeColumn to reorder columns in Tree, is there a way I can drag the header and drop it somewhere?

I have a TreeViewer that allows user to dynamically change the tree structure by dragging and dropping parent nodes around, moving the node above or below another node. I'd like to allow the user to drag a column header and drop it onto the tree, creating a grouping node for the field represented by that particular dragged column. If I could get the drag to work, I know how to do the rest. I'm just not sure how to actually get a drag event from a Tree Column.

Is it possible? All I need is the Column's text, I could do the rest from there...

Thanks
Re: dragging a TreeColumn [message #733623 is a reply to message #733487] Wed, 05 October 2011 08:44 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
Messages: 75
Registered: July 2009
Member
I guess, this is not possible.

But beside that, please ask yourself, whether this would be an intuitive approach. Without your explanation I would not understand what could happen when dragging a table header onto a tree node. My suggestion: try to rethink about a more intuitive way to do what you intent.
Re: dragging a TreeColumn [message #733654 is a reply to message #733623] Wed, 05 October 2011 10:19 Go to previous message
scb  is currently offline scb Friend
Messages: 43
Registered: July 2009
Member
Imagine a tree being used like a Pivot Table in Excel. The structure of the tree is a data grouping relationship. Let's say it's financial data and the current tree structure has Sector as a parent and child nodes for each Sector. Now picture Subsector being a column. Maybe the user wants to add a SubSector grouping to the tree structure, under the Sector level. Dragging the SubSector column and dropping it on a Sector node could tell the code to create a SubSector Grouping below the Sector level and refresh the tree structure, now showing the data grouped by both Sector and SubSector. Just like a Pivot Table



Previous Topic:Can DateTime widget display hours in 24-hour format?
Next Topic:Re: Eclipse on OSX Lion is it safe?
Goto Forum:
  


Current Time: Fri Mar 29 11:55:45 GMT 2024

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

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

Back to the top