Kenneth P. Bowman (bowman@null.edu) writes:
> I'm trying to write a widget program that has multiple widgetized
> windows.
>
> The program works, mostly. All three windows are realized. Events in
> base_id and display_1_id windows are passed to MANIFOLD_EVENT. For some
> reason, however, no events in 'Display 2' are passed to MANIFOLD_EVENT. I
> know this because I print out part of every event that comes to
> MANIFOLD_EVENT.
>
> Am I doing something wrong here?
I don't see anything manifestly wrong. I wrote a simple test
program putting your principles to work. The program, named TEST,
works perfectly. I include it below.
You don't mention what version of IDL you are running,
but mine runs fine in IDL 5.2 on Windows NT.
Cheers,
David
--
PRO TEST_EVENT, event
Widget_Control, event.id, Get_UValue=thisValue
IF event.type NE 0 THEN RETURN
Print, ''
Print, thisValue
END
PRO TEST
tlb = Widget_Base(XOffset=50, Title='Manifolds')
draw = Widget_Draw(tlb, XSize=200, YSize=200, $
UValue='Manifold', Button_events=1)
tlb1 = Widget_Base(XOffset=150, Group_Leader=tlb, Title='Display 1')
draw1 = Widget_Draw(tlb1, XSize=200, YSize=200, $
UValue='Display 1', Button_events=1)
tlb2 = Widget_Base(XOffset=250, Group_Leader=tlb, Title='Display 2')
draw2 = Widget_Draw(tlb2, XSize=200, YSize=200, $
UValue='Display 2', Button_events=1)
Widget_Control, tlb, /Realize
Widget_Control, tlb1, /Realize
Widget_Control, tlb2, /Realize
XManager, 'test', tlb1, /Just_Reg
XManager, 'test', tlb2, /Just_Reg
XManager, 'test', tlb
END
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|