Re: Problem with scrollable draw widgets and frames [message #11448 is a reply to message #11447] |
Tue, 14 April 1998 00:00   |
David Foster
Messages: 341 Registered: January 1996
|
Senior Member |
|
|
Dyer Lytle wrote:
>
> Hi all,
>
> I had an interesting problem today with a program which was
> giving me an error I don't understand. I've condensed the
> program and included it below. The program pops up a small
> widget with a 'pushme' button. When I push the button, the
> program attempts to pop up another widget containing a scrollable
> graphics window but it dies in the attempt. This is IDL 5.03
> and/or IDL 5.1 Beta running on a Sun Ultra-2 with the Solaris
> operating system.
>
> The funny thing is, if I remove the "frame = 1" keyword from the
> draw widget definition, it works fine!
>
> I don't know if this is platform specific, perhaps it is. Anyway
> the error message I get is (and I get dumped out of IDL!):
>
Note that you can use the following workaround and it works
(I'm on a Sun Ultra1, IDL 5.0.3):
pro test2, leader
a = Widget_Base(Title='test', /Column, Group_Leader=leader, /Modal)
B = WIDGET_BASE(A, /FRAME) ; ADD THIS LINE
d = Widget_Draw(B, $ ; CHANGE ARG1 FROM "a" TO "B"
; frame = 1, $ ; COMMENT OUT THIS LINE
XSize=100, YSize=100, /Scroll, X_Scroll_Size=50, Y_Scroll_Size=50)
Widget_Control, a, /Realize
end
pro x_event, event
test2,event.top
end
pro test
x = Widget_Base(Title='test', /Column, XOffset=200, YOffset=200)
y = Widget_Button(x, Value='pushme')
Widget_Control, x, /Realize
Xmanager, 'x', x, Event_Handler='x_event'
end
Dave
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
|
|
|