[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: How to make a custom drag and drop tracker image

control.addListener(SWT.DragDetect, new Listener() {
    public void handleEvent(Event e) {
        // code to start using Tracker.
    }
});

"Kevin" <kevinlouisnospam@xxxxxxxxxxx> wrote in message 
news:ct3dc4$mea$1@xxxxxxxxxxxxxxxxxx
> Hi Veronika,
>
> I cannot find the DragDetect function in SWT.  Could you tell me which 
> file
> I should look at?
>
> Thanks.
>
> Kevin
>
> "Veronika Irvine" <veronika_irvine@xxxxxxx> wrote in message
> news:csqr0n$b6k$1@xxxxxxxxxxxxxxxxxx
>> You can not do it using DragSource.  You must implement your own mouse
> event
>> handlers to simulate drag and drop.  This is how Eclipse allows you to
> drag
>> views around the workbench.  It does not use DragSource and DropTarget, 
>> it
>> uses DragDetect, MouseEnter, MouseMove, MouseExit events etc.
>>
>>
>> "Kevin" <kevinlouisnospam@xxxxxxxxxxx> wrote in message
>> news:cspl82$v4g$1@xxxxxxxxxxxxxxxxxx
>> > Could you tell me how it can be done?  I look at the DragSource.drag
>> > function, it uses the COM.DoDragDrop to do the drag drop.  I don't know
>> > where I can set the Tracker.
>> >
>> > Thanks.
>> >
>> > "Veronika Irvine" <veronika_irvine@xxxxxxx> wrote in message
>> > news:csoir4$3so$1@xxxxxxxxxxxxxxxxxx
>> >> This is not currently supported with DragSource/DropTarget.  This is a
>> >> requirement that I am investigating but I can not give a date when 
>> >> this
>> > will
>> >> be available.
>> >>
>> >> You could use org.eclipse.swt.widgets.Tracker and implement your own
>> >> DragDetect listener.
>> >>
>> >> "Kevin" <kevinlouisnospam@xxxxxxxxxxx> wrote in message
>> >> news:csm7vb$8mq$1@xxxxxxxxxxxxxxxxxx
>> >> > Hi,
>> >> >
>> >> > I want to drag a tree item to the editor.  I want to tracker image
>> > showing
>> >> > the actual size of the object being dropped.  Just like when you 
>> >> > move
> a
>> >> > control, it shows the tracker with the actual size of the object
> moved.
>> >> >
>> >> > Could someone tell me how to do it or which classes I should look 
>> >> > at?
>> >> >
>> >> > Thanks,
>> >> >
>> >> > Kevin
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>