Drag and Drop to TabItem's Viewer [message #465764] |
Wed, 04 April 2007 21:51 |
Gary Messages: 6 Registered: July 2009 |
Junior Member |
|
|
It is possible for a viewer to have DropSupport if that viewers parent
composite is not the composite that is provided by the EditorPart/ViewPart
createPartControl(Composite parent)?
The reason i ask is i have several viewers working as drop targets all of
which are created as :
public class NetworkView extends ViewPart {
public void createPartControl(Composite parent)
{
viewer = new TreeViewer(parent, style);
viewer.addDropSupport(...)
}
}
and the non-working Drop Target is built in this way:
public class NetworkView extends ViewPart {
public void createPartControl(Composite parent)
{
TabFolder folder = new TabFolder(parent, style);
TabItem tabitem = new TabItem(folder, style);
viewer = new TreeViewer(tabitem, style);
viewer.addDropSupport(...)
}
}
This occurs while using the same ViewerDropAdapter and ByteArrayTransfer
classes in working scenarios as the broken scenario.. Yet, I cannot seem to
receive SWT.DragDetect events on the parent, folder, or tree.
ViewerDropAdapter.dragOver() and ViewerDropAdapter .validateDrop() are
called in the working scenarios but not for the broken scenario.
I'm not sure if this could be a parenting problem, focus problem, transfer
class problem.. been looking into all these situations only to think its a
parenting problem.. yet i also cant find any reason why a viewer
constructed in certain ways would not be able to be drop target...
|
|
|
Powered by
FUDForum. Page generated in 0.02746 seconds