|
|
|
Re: DnD question [message #507777 is a reply to message #507747] |
Thu, 14 January 2010 10:54 |
Niels Lippke Messages: 71 Registered: December 2009 |
Member |
|
|
Ok, I can answer the last question by myself: using event.detail =
DND.DROP_NONE.
But Shift is not working for me...
"Niels Lippke" <niels.lippke@airpas.com> schrieb im Newsbeitrag
news:hin9mi$3vf$1@build.eclipse.org...
> Hmm, somehow it is not working for me. I can see Alt or Control, but never
> Shift.
>
> One more question: I'm using a LocalSelectionTransfer to see what kind of
> selection is going to be dropped. If the dropTarget component doesn't like
> the selection is it possible to programmatically stop the drag event?
>
> Thanks, Niels
>
> "Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
> news:hin2ug$tpu$1@build.eclipse.org...
>> Hi.
>>
>> The value of "detail" is decided by the modifiers pressed:
>>
>> DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
>> DND.DROP_COPY => Control
>> DND.DROP_LINK => Alt or Shift + Control
>>
>> But only if the dragSource and dropTarget both support the operation,
>> otherwise its DND.DROP_NONE.
>>
>> Greetings,
>> Tim
>>
>>> Hi,
>>> Is there a way to get information about the keystat while a drop occurs?
>>> I'd like to know wether Shift or Control is pressed, simultaneously.
>>> Regards,
>>> Niels
>
|
|
|
Re: DnD question [message #507799 is a reply to message #507747] |
Thu, 14 January 2010 17:26 |
Tim Buschtoens Messages: 396 Registered: July 2009 |
Senior Member |
|
|
> Hmm, somehow it is not working for me. I can see Alt or Control, but
> never Shift.
Well, Shift is the same as no modifier pressed (DND.DROP_MOVE), so there
is no change. So, no, Shift can not be detected.
>
> One more question: I'm using a LocalSelectionTransfer to see what kind
> of selection is going to be dropped. If the dropTarget component doesn't
> like the selection is it possible to programmatically stop the drag event?
Setting operation to DND.DROP_NONE during dropAccept prevents the drop
event. Does that help?
Greetings,
Tim
>
> Thanks, Niels
>
> "Tim Buschtöns" <tbuschto@eclipsesource.com> schrieb im Newsbeitrag
> news:hin2ug$tpu$1@build.eclipse.org...
>> Hi.
>>
>> The value of "detail" is decided by the modifiers pressed:
>>
>> DND.DROP_MOVE => no modifier or Shift or Alt + any other modifier
>> DND.DROP_COPY => Control
>> DND.DROP_LINK => Alt or Shift + Control
>>
>> But only if the dragSource and dropTarget both support the operation,
>> otherwise its DND.DROP_NONE.
>>
>> Greetings,
>> Tim
>>
>>> Hi,
>>> Is there a way to get information about the keystat while a drop
>>> occurs? I'd like to know wether Shift or Control is pressed,
>>> simultaneously.
>>> Regards,
>>> Niels
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.04051 seconds