PShelf DND [message #22401] |
Fri, 05 January 2007 05:23 |
Eclipse User |
|
|
|
Originally posted by: partyhut.internode.on.net
Hi all,
How can I add PShelfItem as a target of drag and drop? The DropTarget
constructor only accept Control as param...I tried to use
pShelfItem.getBody() as target. However it doesn't work. When I am
draging a item from shelf item 1 to shelf item 2, I can only see the
title panel of the shelf item 2, not the body control, so I couldn't
drop my item on it.... and the title part of the shelf item 2 doesn't
accept my drop action.
|
|
|
|
Re: PShelf DND [message #22526 is a reply to message #22482] |
Sun, 07 January 2007 22:16 |
Eclipse User |
|
|
|
Originally posted by: partyhut.internode.on.net
Thank you Matthew! Normally, how would you decide which shelf it was
dropped on? Use X and Y value? First time do DND here :)
Matthew Hall wrote:
> HS wrote:
>> Hi all,
>>
>> How can I add PShelfItem as a target of drag and drop? The DropTarget
>> constructor only accept Control as param...I tried to use
>> pShelfItem.getBody() as target. However it doesn't work. When I am
>> draging a item from shelf item 1 to shelf item 2, I can only see the
>> title panel of the shelf item 2, not the body control, so I couldn't
>> drop my item on it.... and the title part of the shelf item 2 doesn't
>> accept my drop action.
>
> This is just a guess, but I think PShelfItem is a Widget and not a
> Control, it is not eligible for drag events. What you probably want to
> do is use the PShelf for the drop target, and when the user drops you
> have to discover which shelf it was dropped on.
>
> Matthew
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02802 seconds