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

Home » Public Forums » archive » Problems with dual draw widgets
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
Problems with dual draw widgets [message #1591] Mon, 06 December 1993 15:50
8015 is currently offline  8015
Messages: 52
Registered: November 1993
Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: undefining structures ?
Next Topic: Re: Efficient IDL programming (use outer product)

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

Current Time: Wed Oct 08 13:47:44 PDT 2025

Total time taken to generate the page: 0.00674 seconds