Re: blank window pops up after exit xmovie [message #40063] |
Sun, 11 July 2004 11:58 |
biophys
Messages: 68 Registered: July 2004
|
Member |
|
|
Thanks, David. I should put those two lines in the very beginning
instead of into different draw_widget event entries.
IF (TAG_NAMES(ev, /STRUCTURE_NAME) eq 'WIDGET_DRAW') THEN BEGIN
Widget_Control, event.id, Get_Value=wid
WSet, wid
David Fanning <davidf@dfanning.com> wrote in message news:<MPG.1b58fb5da6d61dda9897d3@news.frii.com>...
> biophysics writes:
>
>> I'm a newbie with widget programing. I was trying to call your xmovie
>> as triggered by a widget_button in the main program. After I exit the
>> xmovie there 's only the main program with a draw widget and several
>> buttons left. But then if I click on the draw widget, a blank window
>> pops up. Will you be able to explain what's wrong with my program?
>> What should I do to avoid having this "window,0" pop-up?
>
> XMovie!? What is this, embarrass David week? Sigh...
>
> What's wrong with your program has nothing to do with me. :-)
>
> You don't know where you are drawing your graphics.
> When you click in your draw widget, your event handler
> is issuing some kind of graphics command, but your
> draw widget window isn't the current graphics window.
> If it was, the graphics would go into it and not be
> forced to open a window itself.
>
> Inside the event handler, you might make the draw widget
> the current graphics window by doing something like this:
>
> Widget_Control, event.id, Get_Value=wid
> WSet, wid
>
> Where event.id is the draw widget.
>
> Cheers,
>
> David
|
|
|
Re: blank window pops up after exit xmovie [message #40067 is a reply to message #40063] |
Fri, 09 July 2004 18:59  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
biophysics writes:
> I'm a newbie with widget programing. I was trying to call your xmovie
> as triggered by a widget_button in the main program. After I exit the
> xmovie there 's only the main program with a draw widget and several
> buttons left. But then if I click on the draw widget, a blank window
> pops up. Will you be able to explain what's wrong with my program?
> What should I do to avoid having this "window,0" pop-up?
XMovie!? What is this, embarrass David week? Sigh...
What's wrong with your program has nothing to do with me. :-)
You don't know where you are drawing your graphics.
When you click in your draw widget, your event handler
is issuing some kind of graphics command, but your
draw widget window isn't the current graphics window.
If it was, the graphics would go into it and not be
forced to open a window itself.
Inside the event handler, you might make the draw widget
the current graphics window by doing something like this:
Widget_Control, event.id, Get_Value=wid
WSet, wid
Where event.id is the draw widget.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|