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

Home » Public Forums » archive » Re: CW_DEFROI (some help for dumb person doing first widget prog...)
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
Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44748] Fri, 15 July 2005 23:30 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Peter Clinch writes:

> Next up, in my event handler for the menu option that will activate the
> ROI selection, I start with
>
> wDraw=widget_info(event.top, find_by_uname="Draw")
>
> CentreROI=CW_DEFROI(wDraw)
>
> that creates the relevant ROI widget, and the cursor position is updated
> when the mouse is over the image, but it doesn't appear to draw anything
> on the image. Can anyone one tell me exactly how I'm being Dumb here?

You passed CW_DEFROI the draw widget identifier. It needs
the graphics window index number, which is the *VALUE*
of the draw widget (after it has been realized).

wDraw=widget_info(event.top, find_by_uname="Draw")
Widget_Control, wDraw, Get_Value=windex
WSet, windex
CentreROI=CW_DEFROI(windex)

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44842 is a reply to message #44748] Mon, 18 July 2005 03:38 Go to previous message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
David Fanning wrote:

> You passed CW_DEFROI the draw widget identifier. It needs
> the graphics window index number, which is the *VALUE*
> of the draw widget (after it has been realized).
>
> wDraw=widget_info(event.top, find_by_uname="Draw")
> Widget_Control, wDraw, Get_Value=windex
> WSet, windex
> CentreROI=CW_DEFROI(windex)

Oh, hang on... if I do that it crashes on the cw_defroi call

The crashpoint cursor is in the cw_defroi.pro file, at the line

WIDGET_CONTROL, draw, GET_VALUE=win

result is I'm even more confused than I was before... :-(

Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44844 is a reply to message #44748] Mon, 18 July 2005 01:47 Go to previous message
Peter Clinch is currently offline  Peter Clinch
Messages: 98
Registered: April 1996
Member
David Fanning wrote:

>> Can anyone one tell me exactly how I'm being Dumb here?

> [snip David tells me how I'm being Dumb here]

Aha! That would be it! Many thanks for taking the trouble to reply.

Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: programming course
Next Topic: Data acquisition with IDL...

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

Current Time: Sun Oct 12 06:42:53 PDT 2025

Total time taken to generate the page: 0.72112 seconds