PDA

View Full Version : [2.0-M2] Drag/Drop TabItem header



Rvanlaak
28 May 2009, 4:20 AM
Hi,

Drag&Drop is having a important role in the application i am building. A button is the DragSource, and I want to set the header of a TabItem as DragTarget. I am doing this using the following code:




DropTarget target = new DropTarget( this.getHeader() )
{
@Override
protected void onDragDrop(DNDEvent event) {
super.onDragDrop(event);

System.out.println( getText() + " <> "+ event.getData() );
}

};
target.setGroup("dnd-button");
target.setOverStyle("drag-ok");
Somehow this isn't working, so I was wondering or it is even possible to set the header element as target.