Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » PShelf DND
PShelf DND [message #22401] Fri, 05 January 2007 05:23 Go to next message
Eclipse UserFriend
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 #22482 is a reply to message #22401] Fri, 05 January 2007 16:01 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
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
Re: PShelf DND [message #22526 is a reply to message #22482] Sun, 07 January 2007 22:16 Go to previous message
Eclipse UserFriend
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
Re: PShelf DND [message #574301 is a reply to message #22401] Fri, 05 January 2007 16:01 Go to previous message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
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
Re: PShelf DND [message #574324 is a reply to message #22482] Sun, 07 January 2007 22:16 Go to previous message
Hemant Singh is currently offline Hemant SinghFriend
Messages: 24
Registered: January 2010
Junior Member
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
Previous Topic:PShelf DND
Next Topic:grid viewer
Goto Forum:
  


Current Time: Fri Apr 26 13:06:49 GMT 2024

Powered by FUDForum. Page generated in 0.03261 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top