Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » DnD Drag behavour on Table control
DnD Drag behavour on Table control [message #460836] Thu, 08 September 2005 13:25 Go to next message
Bruce Skingle is currently offline Bruce SkingleFriend
Messages: 7
Registered: July 2009
Junior Member
I have a table based application with spreadsheet like behaviour which
allows the user to select arbitrary blocks of cells (possibly not including
the entire row). The selection behaviour of the table control does not
support this, so I have an invisible column zero to hide the control's
native selection and am painting my own outline around the selected cell(s)
a la Excel.

I want to allow the user to drag the selected cells from my application into
Excel (copy and paste works fine).

The behavior of drag support on the table control seems to require the mouse
cursor to be over the highlight of the selection in order to work. Since no
native selection is visible in my app DnD does not work at all from the
table.

Can anyone suggest any way to get around this?

As an aside, if SWT.FULL_SELECTION is not used then drag does not work if
you click on part of the cell zero containing the selected row which is
after the last character displayed (and not highlighted), or on any other
cell in the row. This seems like a defect to me, but I accept that others
may not agree.

Bruce.
Re: DnD Drag behavour on Table control [message #460869 is a reply to message #460836] Fri, 09 September 2005 10:10 Go to previous message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
The drag-and-drop doesn't work because some cells appear highlighted; it works because the mouse is over the *selection* so this currently isn't going to happen.

You might want to raise a feature request, because being able to select a selection of cells that doesn't include entire rows/columns sounds like a nice feature to have in an SWT table.

In the meantime, you could register mouse listeners yourself to detect a potential drag situation, then take the selected cells and put them into the drag-and-drop clipboard, but it would be hard work and prone to breakages.
Previous Topic:cannot find view
Next Topic:Table gridlines & headers misaligned
Goto Forum:
  


Current Time: Sun Jun 16 09:35:18 GMT 2019

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

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

Back to the top