comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: List Widgets: drag & drop?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: List Widgets: drag & drop? [message #6684] Mon, 29 July 1996 00:00
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Filip Vanhellemont <Filip.Vanhellemont@oma.be> wrote:
>
> Does anyone know if it is possible to make use of drag & drop events
> with list widgets? I have noticed that, when I click the middle mouse
> button on an item in
> a list widget, a drag & drop mouse pointer appears. The problem is, that
> this does not generate an event.
> I would like to be able to drag a data file into a draw region. IDL
> documentation offers no help.

As for the list widgets returning drag/drop events, you're out of
luck. From the on-line help under WIDGET_LIST you can see that
the only information returned is the index of the item selected
and whether the button press was a single- or double-click.

You might try using a multi-line WIDGET_TEXT widget, where drag/drop
events can be returned by specifying the /ALL_EVENTS and
/EDITABLE keywords. But note that this is simply for cutting and
pasting text into the widget.

If you want to display the contents of a file "dragged" from a
list widget, why not simply reference the filename selected using
the EVENT.INDEX structure element and then display the file? You
could then have your program prompt you to select a draw region to use
for the display, using a mouse press that would generate an event
from the appropriate draw widget.

I don't think you're going to be able to drag your file into the
draw region like you'd like. You might check the RESOURCE_NAME
keyword that can be applied to all widget-creation routines,
and see if you can somehow use your .Xdefaults file to modify
the behavior of your widgets.

David Foster
foster@bial1.ucsd.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Dynamic Menus
Next Topic: Plot two images in different color

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:40:54 PDT 2025

Total time taken to generate the page: 0.00594 seconds