|
|
|
|
Re: How to make a custom drag and drop tracker image [message #449452 is a reply to message #449314] |
Mon, 24 January 2005 18:04 |
Kevin Messages: 34 Registered: July 2009 |
Member |
|
|
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@oti.com> wrote in message
news:csqr0n$b6k$1@www.eclipse.org...
> 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@hotmail.com> wrote in message
> news:cspl82$v4g$1@www.eclipse.org...
> > 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@oti.com> wrote in message
> > news:csoir4$3so$1@www.eclipse.org...
> >> 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@hotmail.com> wrote in message
> >> news:csm7vb$8mq$1@www.eclipse.org...
> >> > 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
> >> >
> >> >
> >>
> >>
> >
> >
>
>
|
|
|
Re: How to make a custom drag and drop tracker image [message #449479 is a reply to message #449452] |
Tue, 25 January 2005 12:50 |
Veronika Irvine Messages: 1272 Registered: July 2009 |
Senior Member |
|
|
control.addListener(SWT.DragDetect, new Listener() {
public void handleEvent(Event e) {
// code to start using Tracker.
}
});
"Kevin" <kevinlouisnospam@hotmail.com> wrote in message
news:ct3dc4$mea$1@www.eclipse.org...
> 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@oti.com> wrote in message
> news:csqr0n$b6k$1@www.eclipse.org...
>> 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@hotmail.com> wrote in message
>> news:cspl82$v4g$1@www.eclipse.org...
>> > 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@oti.com> wrote in message
>> > news:csoir4$3so$1@www.eclipse.org...
>> >> 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@hotmail.com> wrote in message
>> >> news:csm7vb$8mq$1@www.eclipse.org...
>> >> > 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
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04011 seconds