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

Home » Public Forums » archive » Can you drag and drop a Windows file into a Draw Widget?
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
Can you drag and drop a Windows file into a Draw Widget? [message #26376] Tue, 04 September 2001 08:19 Go to next message
Steve Hartmann is currently offline  Steve Hartmann
Messages: 21
Registered: March 2000
Junior Member
It would be nice if I could drag an image file from Windows explorer
and drop it into a Draw Widget and have it display automatically.
I've looked around a bit and doubt this is possible, but thought I'd
ask first before I gave up on the idea. Can IDL capture the name of a
file dropped into a display window?

Thanks,
Steve Hartmann
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26900 is a reply to message #26376] Tue, 02 October 2001 15:44 Go to previous messageGo to next message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
JD Smith wrote:

> Not to mention the glaring fact that all this ActiveX nonsense actively
> defeats cross-platform compatibility, the glorious praises of which RSI
> sings itself in rich falsetto. It's a song fading noticeably into the
> background as the drone of Microsoft Musak creeps steadily higher in
> volume. No wonder I can't hear the birds singing anymore.
>
> JD

Three words:
Remote Procedure Calls.

You're just bitter because *NIX is more robust, stable and elegant, and
Microsoft is merely more popular. :-)

Rich

--
Richard Younger
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26903 is a reply to message #26376] Tue, 02 October 2001 14:34 Go to previous messageGo to next message
John-David T. Smith is currently offline  John-David T. Smith
Messages: 384
Registered: January 2000
Senior Member
Richard Younger wrote:
>
> Richard Younger wrote:
>>
>> *mumble* *mumble* ... Liam's recent post ... *mumble* IDL 5.5
>> *mumble mumble* ... http://www.rsinc.com/newsletter/#IDLCS ...
>> *mumble mumble* ... ActiveX container ... *mumble* ... might be
>> able to do what you want ... *mumble* ... don't really know ...
>> *mumble* ... sounds promising.
>>
>> A non-answer.
>
> *Stops, thinks a minute*
>
> Hmm. On further reflection, I'm thinking that the whole ActiveX
> container thing is much more likely to allow you to embed your picture
> in a widget without actually importing it into an IDL-manipulatable
> form. Drat. I knew I was mumbling for a reason.
>
> Hopefully one of these days, I'll actually know what I'm talking about.
>

Not to mention the glaring fact that all this ActiveX nonsense actively
defeats cross-platform compatibility, the glorious praises of which RSI
sings itself in rich falsetto. It's a song fading noticeably into the
background as the drone of Microsoft Musak creeps steadily higher in
volume. No wonder I can't hear the birds singing anymore.

JD
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26904 is a reply to message #26376] Tue, 02 October 2001 12:45 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard Younger (younger@ll.mit.edu) writes:

> Hopefully one of these days, I'll actually know what I'm talking about.

Uh, right. But don't let that stop you from
posting more articles. :-)

Cheers,

David

P.S. Let's just say hitting that Send button
has been know to result in great insight into IDL
programming. (In addition to great humility, of
course, but that goes without saying. We all wish
the cause and effect was the other way around, but
alas, it ain't so.)

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26905 is a reply to message #26376] Tue, 02 October 2001 12:35 Go to previous messageGo to next message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Richard Younger wrote:
>
> *mumble* *mumble* ... Liam's recent post ... *mumble* IDL 5.5
> *mumble mumble* ... http://www.rsinc.com/newsletter/#IDLCS ...
> *mumble mumble* ... ActiveX container ... *mumble* ... might be
> able to do what you want ... *mumble* ... don't really know ...
> *mumble* ... sounds promising.
>
> A non-answer.

*Stops, thinks a minute*

Hmm. On further reflection, I'm thinking that the whole ActiveX
container thing is much more likely to allow you to embed your picture
in a widget without actually importing it into an IDL-manipulatable
form. Drat. I knew I was mumbling for a reason.

Hopefully one of these days, I'll actually know what I'm talking about.

Rich

--
Richard Younger
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26906 is a reply to message #26376] Tue, 02 October 2001 12:13 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Richard Younger (younger@ll.mit.edu) writes:

> *mumble* *mumble* ... Liam's recent post ... *mumble* IDL 5.5 *mumble
> mumble* ... http://www.rsinc.com/newsletter/#IDLCS ... *mumble mumble*
> ... ActiveX container ... *mumble* ... might be able to do what you want
> ... *mumble* ... don't really know ... *mumble* ... sounds promising.

Oh, I agree, these things always *sound* promising.
ION and Active X components via the IDL draw widget
sounded promising, too. But in practice, alas, they
are often less promising than one would have hoped.
But, then again, some of us are eternal optimists. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26907 is a reply to message #26376] Tue, 02 October 2001 11:48 Go to previous messageGo to next message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
*mumble* *mumble* ... Liam's recent post ... *mumble* IDL 5.5 *mumble
mumble* ... http://www.rsinc.com/newsletter/#IDLCS ... *mumble mumble*
... ActiveX container ... *mumble* ... might be able to do what you want
... *mumble* ... don't really know ... *mumble* ... sounds promising.

A non-answer.

Rich

--
Richard Younger
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26909 is a reply to message #26376] Tue, 02 October 2001 10:28 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Steve Hartmann (s.l.h@badspam.home.com) writes:

> My experience with this
> newsgroup the last several years is that whenever you (dwf) say
> something can't be done, it often gets done by one of the other stars.

Yeah, I've been working on that .283 batting average,
but it doesn't look like I'm going to make the All-Star
team. :-(

Cheers,

David

P.S. Let's just say as I dragged myself out of bed
and over to the medicine cabinet for my daily
Ibuprofen therapy this morning, the thought
crossed my mind that the people I play tennis with
are all 10-15 years younger than me. Some days
I get the impression all the IDL programmers on this
newsgroup are at least a generation or two younger
than me. It's scary. :-(

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26911 is a reply to message #26376] Tue, 02 October 2001 10:08 Go to previous messageGo to next message
Steve Hartmann is currently offline  Steve Hartmann
Messages: 21
Registered: March 2000
Junior Member
>> Thanks for the answer. I appreciate it.
>
> I just hope the answer is right. No one likes to
> answer that something is "impossible" because,
> inevitably, that kind of answer encourages the
> folks with time on their hands and almost before
> you can get back to your desk with the fresh coffee
> someone has figured out a way to do it. :-(
>
> But no one has ever said I'm not willing to make
> a fool of myself, so there you go.
>
> Cheers,
>
> David

Well then I'm glad you say it can't be done. My experience with this
newsgroup the last several years is that whenever you (dwf) say
something can't be done, it often gets done by one of the other stars.
Often, as in this case, that works out great for me. As I can always
(and do) browse for an image file, it would be neat to just drag and
drop into a window.

Thanks again,
Steve
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26912 is a reply to message #26376] Tue, 02 October 2001 09:43 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Steve Hartmann (s.l.h@badspam.home.com) writes:

> Thanks for the answer. I appreciate it.

I just hope the answer is right. No one likes to
answer that something is "impossible" because,
inevitably, that kind of answer encourages the
folks with time on their hands and almost before
you can get back to your desk with the fresh coffee
someone has figured out a way to do it. :-(

But no one has ever said I'm not willing to make
a fool of myself, so there you go.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26913 is a reply to message #26376] Tue, 02 October 2001 09:22 Go to previous messageGo to next message
Steve Hartmann is currently offline  Steve Hartmann
Messages: 21
Registered: March 2000
Junior Member
>> I posted this message a few weeks ago but didn't get any response. I'd
>> like to capture the name of a file dropped (using the mouse) from
>> Windows explorer into a Draw Widget. Is this possible? Lots of utility
>> programs (Winzip, Winamp, etc) are able to do this. What about IDL?
>
> No, it is not possible. At least not in any
> current version of IDL. :-)
>
> Cheers,
>
> David

Thanks for the answer. I appreciate it.
-Steve
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26914 is a reply to message #26376] Tue, 02 October 2001 09:06 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Steve Hartmann (s.l.h@badspam.home.com) writes:

> I posted this message a few weeks ago but didn't get any response. I'd
> like to capture the name of a file dropped (using the mouse) from
> Windows explorer into a Draw Widget. Is this possible? Lots of utility
> programs (Winzip, Winamp, etc) are able to do this. What about IDL?

No, it is not possible. At least not in any
current version of IDL. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26933 is a reply to message #26376] Thu, 04 October 2001 08:27 Go to previous messageGo to next message
Richard Younger is currently offline  Richard Younger
Messages: 43
Registered: November 2000
Member
Peter Mason wrote:
>
> Duty calls.
> In a renewed attempt to maintain my reputation of d.o.d.c, I hereby
> post my nomination for "daddy's job of the year". Personally, I
> think it makes J.D.'s text-widget subterfuge (of a couple of years
> back) look as much a part of IDL as, say, a piston looks like a part
> of an internal combustion engine. I'm particularly proud of my
> method of getting "HWND"s for IDL widgets and challenge anyone to beat
> it on the grounds of "ultra-risky platform-specific code that's sure
> to break one day".
>
> Cheers
> Peter Mason
> CSIRO DEM MMTG
> mailto://peter.mason@csiro.au

I'm impressed.

There aren't many good windows programmers who are regular posters, so
it's good to see one chime in.

David was right, there isn't a way to do it in IDL. The solution isn't
really an IDL solution at all, but subclasses ... er, excuse me,
politely hijacks ... the IDL Widget window on an OS level (it's polite
because it gives the window back). I had to spend a little quality time
with my Big Thick Windows Programming(tm) book to figure out what was
going on.

Thanks for the solution and the interesting code!

Back to what I should be doing.

Best,
Rich

--
Richard Younger
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26940 is a reply to message #26376] Wed, 03 October 2001 19:57 Go to previous messageGo to next message
Steve Hartmann is currently offline  Steve Hartmann
Messages: 21
Registered: March 2000
Junior Member
On 3 Oct 2001 17:26:13 -0700, peter.mason@csiro.au (Peter Mason)
wrote:
> Duty calls.
> In a renewed attempt to maintain my reputation of d.o.d.c, I hereby
> post my nomination for "daddy's job of the year". Personally, I
> think it makes J.D.'s text-widget subterfuge (of a couple of years
> back) look as much a part of IDL as, say, a piston looks like a part
> of an internal combustion engine. I'm particularly proud of my
> method of getting "HWND"s for IDL widgets and challenge anyone to beat
> it on the grounds of "ultra-risky platform-specific code that's sure
> to break one day".
>
> Anyway, it works. Or to be precise, it worked today on my PC running
> IDL 5.4 on WinNT4 SP 6.
> It can be had via anonymous FTP:
> Server: ftp.syd.dem.csiro.au
> File: dropfile.zip
> You won't be able to get a directory listing of this server. If you
> want a copy of this thing and the FTP doesn't work for you then email
> me and I'll send it to you.
>
> Cheers
> Peter Mason
> CSIRO DEM MMTG
> mailto://peter.mason@csiro.au
>
>

Very nice! It works on my Win2k machine as well. Thanks alot - I think
this will be very handy. I'm glad I re-posted the question.

I knew that someone on this group *could* do this, and I'm greatful
that you actually *did* do it.

Thanks,
-Steve
Re: Can you drag and drop a Windows file into a Draw Widget? [message #26947 is a reply to message #26912] Wed, 03 October 2001 17:26 Go to previous messageGo to next message
peter.mason is currently offline  peter.mason
Messages: 4
Registered: October 2001
Junior Member
Duty calls.
In a renewed attempt to maintain my reputation of d.o.d.c, I hereby
post my nomination for "daddy's job of the year". Personally, I
think it makes J.D.'s text-widget subterfuge (of a couple of years
back) look as much a part of IDL as, say, a piston looks like a part
of an internal combustion engine. I'm particularly proud of my
method of getting "HWND"s for IDL widgets and challenge anyone to beat
it on the grounds of "ultra-risky platform-specific code that's sure
to break one day".

Anyway, it works. Or to be precise, it worked today on my PC running
IDL 5.4 on WinNT4 SP 6.
It can be had via anonymous FTP:
Server: ftp.syd.dem.csiro.au
File: dropfile.zip
You won't be able to get a directory listing of this server. If you
want a copy of this thing and the FTP doesn't work for you then email
me and I'll send it to you.

Cheers
Peter Mason
CSIRO DEM MMTG
mailto://peter.mason@csiro.au



David Fanning <david@dfanning.com> wrote in message news:<MPG.16239cb2159420379896e2@news.frii.com>...
> Steve Hartmann (s.l.h@badspam.home.com) writes:
>
>> Thanks for the answer. I appreciate it.
>
> I just hope the answer is right. No one likes to
> answer that something is "impossible" because,
> inevitably, that kind of answer encourages the
> folks with time on their hands and almost before
> you can get back to your desk with the fresh coffee
> someone has figured out a way to do it. :-(
>
> But no one has ever said I'm not willing to make
> a fool of myself, so there you go.
>
> Cheers,
>
> David
Re: Can you drag and drop a Windows file into a Draw Widget? [message #27067 is a reply to message #26940] Thu, 04 October 2001 16:11 Go to previous message
peter.mason is currently offline  peter.mason
Messages: 4
Registered: October 2001
Junior Member
Steve Hartmann <s.l.h@badspam.home.com> wrote in message news:<qMy7OzIFFyK8iM2YsV9wosPVF5oc@4ax.com>...
>
> Very nice! It works on my Win2k machine as well. Thanks alot - I think
> this will be very handy. I'm glad I re-posted the question.
>
> I knew that someone on this group *could* do this, and I'm greatful
> that you actually *did* do it.
>
> Thanks,
> -Steve

I'm glad that you found it useful. It's sort-of cringeworthy,
though, isn't it?
Once again I under-estimated the power of the "send" button and
yesterday, after posting, I began to worry about how hard-coded
"dropfile" is. I have since opened it up a bit so that it can be
used on something more complicated than the simplest base+draw_widget
program. The update's on "my" FTP server.
My apologies to those who tried to access the FTP server and couldn't
- I think there's still some kind of security block on the thing. It
would probably be best to email me if you want the program.

Cheers
Peter Mason
mailto://peter.mason@csiro.au
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Polygon filling oddities
Next Topic: Polygon filling oddities

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

Current Time: Wed Oct 08 14:01:20 PDT 2025

Total time taken to generate the page: 0.01126 seconds