System: Sun Sparc 10
OS: SunOS 4.1.3
IDL: 3.5 (same prob under 3.1)
Window: Same prob under both OLIT and IDL Motif on OLIT
I'm having a problem with two widget_draw ports on a single screen. I
have an application which is being used to select points between two
different images (one in each draw widget). The widget names are
draw_top and draw_bot, and I have the two portions of code that are
called whenever the mouse is clicked in their respective drawing
areas.
pro drawprob
; create the drawing areas
draw_top = widget_draw(wcol, xsize=drawx, ysize=drawy, $
/button_events, uvalue='draw_top', $
scroll=10, x_scroll_size=drawx, y_scroll_size=drawy)
draw_bot = widget_draw(wcol, xsize=drawx, ysize=drawy, $
/button_events, uvalue='draw_bot', $
scroll=10, x_scroll_size=drawx, y_scroll_size=drawy)
end
pro drawprob_event
; handle mouse clicks in the drawing areas
'draw_top': begin
widget_control, draw_top, get_value=index_top
wset, index_top
cursor, x_top, y_top, /down, /device
xyouts, x_top, y_top, '+', alignment=0.5, /device
print, x_top, y_top, index_top
end
'draw_bot': begin
widget_control, draw_bot, get_value=index_bot
wset, index_bot
cursor, x_bot, y_bot, /down, /device
xyouts, x_bot, y_bot, 'x', alignment=0.5, /device
print, x_bot, y_bot, index_bot
end
end
When I click in the first window (either one) everything is fine. When
I click in the other window, the application seems to get lost and
can't figure out what window I clicked in. There is some kind of
pattern that I haven't quite figured out. The clicking seems to get
behind by a window each time I change windows (something like that). If
something is obvious please clue me in. If you think you can help by
looking at the full code for this part, I'll be glad to email it (500+
lines).
Thanks,
Mike Schienle Hughes SBRC, Santa Barbara, CA
mgs@sbjse0.sbrc.hac.com 75 Coromar Drive, M/S B28/87
Voice: (805)562-7466 Fax: (805)562-7881 Goleta, CA 93117
|