Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » drag n drop: How to change the text, which is shown during drag
drag n drop: How to change the text, which is shown during drag [message #483063] Sun, 30 August 2009 15:01 Go to next message
Uli is currently offline UliFriend
Messages: 2
Registered: July 2009
Junior Member
Hello

Is it possible to change the text which is shown during a drag operation.
I tried to change it, but it seems that always the toString() operation of
the selected tableitem is shown.

Thx,
uli
Re: drag n drop: How to change the text, which is shown during drag [message #483072 is a reply to message #483063] Sun, 30 August 2009 20:26 Go to previous messageGo to next message
Rencana Tarigan is currently offline Rencana TariganFriend
Messages: 56
Registered: July 2009
Location: Bandung, Indonesia
Member

you can change it to image by set event.image

Re: drag n drop: How to change the text, which is shown during drag [message #483377 is a reply to message #483063] Tue, 01 September 2009 12:13 Go to previous messageGo to next message
Uli is currently offline UliFriend
Messages: 2
Registered: July 2009
Junior Member
Hi

I don't understand this. I want to change the text, not the image. Or do
you mean to take a image as text?
Re: drag n drop: How to change the text, which is shown during drag [message #483496 is a reply to message #483377] Tue, 01 September 2009 18:21 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
The image that's shown when dragging is just a picture of the source, even
if the source's content was only text. So the drag image has no concept of
its text, it's just an image. But as was suggested, you can change this
image by setting the DragSourceEvent's image field. Create an Image, create
a GC on the image, gc.drawString(...), gc.dispose(), disposeTheImageLater.

Grant


" Uli" <strangequark@gmx.at> wrote in message
news:9196b8fcbf865ea4d32037c5b12c3ac4$1@www.eclipse.org...
> Hi
>
> I don't understand this. I want to change the text, not the image. Or do
> you mean to take a image as text?
>
Previous Topic:How to detect drop location ?
Next Topic:Page Breaks for StyledText
Goto Forum:
  


Current Time: Sat Sep 21 00:35:26 GMT 2019

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

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

Back to the top