Re: How can I force the x=image(...) command to give me a window that is the same size as my image? [message #88594 is a reply to message #88593] |
Wed, 14 May 2014 16:10   |
munka
Messages: 36 Registered: December 2009
|
Member |
|
|
On Wednesday, May 14, 2014 3:23:25 PM UTC-7, David Fanning wrote:
> 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.")
I probably need to take Widget Programming 101 :) I'll look into this, but I think for now, its best to stick with what I know works.
|
|
|