Re: How can I force the x=image(...) command to give me a window that is the same size as my image? [message #88593 is a reply to message #88592] |
Wed, 14 May 2014 15:23   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
mynameismunka@gmail.com writes:
> Would my MOUSE_DOWN_HANDLER still work?
>
> Like this:
>
> im1.window.MOUSE_DOWN_HANDLER='MouseDown'
> im1.window.MOUSE_UP_HANDLER='MouseUp'
> im1.window.Keyboard_Handler='KeyboardHandler'
The program cgCmdWindow (cgWindow is a wrapper for this program) is
already set up for handling widget events. You simply need to write your
own event handler for the program, tell it what events you want it to
handle (button events, for example), and off you go. It is incredibly
simple and simple-minded. Probably why it works so well. ;-)
You don't program it with "handlers", rather you just respond to the
events themselves. Widget Programming 101, really.
If you didn't want to do it yourself, it might take 15 minutes for me to
code something up for you. The program cgCmdWindow is basically a draw
widget that knows how to "execute" IDL graphics commands that are added
to it. Commands like cgImage.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|