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

Home » Public Forums » archive » Re: draw widget in separate window does not create events?
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: draw widget in separate window does not create events? [message #61314] Thu, 10 July 2008 19:03
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Alfred de Wijn writes:

> Hi everyone,
>
> I'm running into an issue with draw widgets. I want to have two
> windows, one with controls, and a second one with the draw widget.
> The controls should respond to motion and button events in the draw
> widget. It works fine as long as I put the draw widget in the same
> window as the controls, but as soon as I split them, it seems that no
> events are created. It must be possible to get this to work. I
> haven't been able to find anything indicating that someone else ran
> into this problem before.
>
> I've included some code below that exhibits the problem using IDL 7.0
> on OS X, IDL 6.4 on Linux, and IDL 6.3 on Windows. I suspect
> programming error on my part, but then I have a report from David
> Fanning that it does work as expected on his Windows system. Using
> the code below, the sliders do not move if I move my cursor around in
> the draw widget if it is in a separate window ('test'), but it does
> work if the sliders and the widget are in the same window ('test, /
> one'). Does anyone know what is causing this behavior?

I'm guessing that the "event loop" is only activated for the
the widget hierarchy rooted at the top-level base used to register
the program with XMANAGER. So, for example, I can make this program
run in separate windows if I also register the draw widget top-level
base with XMANAGER.

xmanager, 'test', root, /no_block
is ~Keyword_Set(one) then xmanager, 'test', drawroot, /no_block

Note that I had to add the modification only to make this
work in IDL 6.4 on Windows. It ran without modification and
worked perfectly in my IDL 7.0.3 installation. Score one for
the Workbench!

Cheers,

David

P.S. If you are keeping score, it is IDL Workbench 1, IDL 6.4 4529.


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Help! IDL 7.0 crashes in Fedora 9
Next Topic: Re: A problem of map of china 选项

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

Current Time: Wed Oct 08 17:34:31 PDT 2025

Total time taken to generate the page: 0.00372 seconds