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

Home » Public Forums » archive » Answer - Image not being retained
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
Answer - Image not being retained [message #1925] Tue, 05 April 1994 21:20
dean is currently offline  dean
Messages: 55
Registered: March 1993
Member
I received several responses about my problem with retaining the image
in WIDGET_DRAW with scoll bars after implementing CURSOR, even after using
RETAIN=2. I have been told that WIDGET_DRAW and CURSOR are not designed to
work together.

The solution is very simple - after it was pointed out to me. By removing
CURSOR and using WIDGET_DRAW's BUTTON_EVENTS and MOTION_EVENTS, the image
is retained while scolling.

If you set up WIDGET_DRAW to look like this:
.
.
.
draw = Widget_Draw(drawbase, $
/BUTTON_EVENTS, $ ;Generate mouse buttons events
/MOTION_EVENTS, $ ;Generate mouse motion events
/FRAME, $ ;Frame drawing area
RETAIN = 2, $ ;Make sure IDL provides backing store.
XSIZE = x_size, $ ;The x size of display area
YSIZE = y_size) ;The y size of display area
.
.
.
You can do this later on without CURSOR.
.
.
.
pxvnt = widget_event(draw)
WHILE (pxvnt.press NE 4 ) DO BEGIN
pxvnt = widget_event(draw)
x = pxvnt.x
y = pxvnt.y
.
.
.
Thanks everybody for your help.

Kelly Dean
CSU/CIRA
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: FAQ
Next Topic: IDL Map Projections ( PLATE CARREE )

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

Current Time: Wed Oct 08 14:32:58 PDT 2025

Total time taken to generate the page: 0.00437 seconds