Re: Multiple draw widget events [message #60084 is a reply to message #60083] |
Fri, 02 May 2008 06:54   |
ben.bighair
Messages: 221 Registered: April 2007
|
Senior Member |
|
|
On May 2, 1:49 am, Jye <jye.sm...@gmail.com> wrote:
> Hi,
>
> Another newbie here so the answer to my problem is most likely
> blatently obvious.
>
> The example below is of a draw widget which windows the displayed
> image when right clicked on the draw widget and the ROI button runs
> CW_DEFROI. But my problem is that the windowing events interfere when
> CW_DEFROI is called! How can I stop this from happening? Im sure it
> has something to do with the /no_block keyword but I have been unable
> to find the solution.
>
> Any help is greatly appreciated.
>
> Cheers
> Jye
Hi,
I am not sure what you are saying is the interference, but I'll guess
that it is the grayscale shifting with the motion events. You are
explicitly turning motion events on in your ROI_EVENT handler.
Removing that line (or setting DRAW_MOTION_EVENTS = 0) will prevent
motion events from occurring.
Cheers,
Ben
>
> ;----------------------------------------------------------- ---------------------------------
> ; ROI
> ;----------------------------------------------------------- ---------------------------------
>
> PRO ROI_event, event
> widget_control, event.top, get_uvalue=info
>
> Widget_Control, info.draw, Draw_Motion_Events=1
>
> xsize=(size(info.image))[1]
> ysize=(size(info.image))[2]
>
> Result = CW_DEFROI(info.draw, IMAGE_SIZE=[xsize,ysize])
>
> END
>
|
|
|