Re: cursor testcase [message #31017 is a reply to message #30921] |
Wed, 29 May 2002 05:27  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Ted Cary (tedcary@yahoo.com) writes:
> On Windows PCs (IDL 5.5), setting direct graphics cursors causes a new
> direct graphics window to pop up if none is open already. Maybe there is a
> reason or a workaround?
I don't know the reason for it. I find it strange, too, that
changing the cursor in a pixmap window is not allowed.
There clearly has to be an open graphics window.
I created a workaround by putting the object graphics draw
widget in a bulletin board base along with a direct graphics
draw widget, with the object graphics draw widget in front.
This way, there is *always* a window open when you change
the direct graphics cursor:
; Setup and realize widgets.
wTLB = Widget_Base(Title='Scribble')
drawBase = Widget_Base(wTLB) ; Bulletin board base
wDraw = Widget_Draw( $
drawBase, $
/Button_Events, $
Graphics_Level=2, $
/Motion_Events, $
Renderer=1, $
Retain=0, $
XSize=400, $
YSize=400 $
)
fakeDraw = Widget_Draw(drawBase)
Widget_Control, wTLB, /Realize
There is a typo a little further on in your code, too.
You have "!Window", and I think you mean "!D.Window".
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|