cw_fslider [message #13949] |
Mon, 21 December 1998 00:00  |
lbryanNOSPAM
Messages: 21 Registered: July 1998
|
Junior Member |
|
|
Hello all,
I am having problem with the DRAG keyword to the CW_FSLIDER function.
When using this slider I want to see the values change as I slide the
slider button. This feature is described in the help section under
the keyword DRAG. According to the help section by setting /DRAG, I
should be able to see events as I drag the slider button. And, in
fact, this works as described in the WIDGET_SLIDER function using the
same keyword. Unfortunately, I need to use the floating version of
this function. BTW, I'm using this to build a tool for interactively
changing the greylevels of a displayed image. Anyone out there
already done this? Thanks for your help.
P.S. I'm still looking for the double slider if anyone has it.
Lisa Bryan
Arete Associates
Tucson, Arizona
lbryan@arete-az.com
|
|
|
Re: cw_fslider [message #24183 is a reply to message #13949] |
Thu, 15 March 2001 23:57  |
Glenn Newnham
Messages: 6 Registered: March 2001
|
Junior Member |
|
|
David and Stein
I went down your modification of the cw_slider route. That works great,
thanks very much.
Regards,
Glenn Newnham
David Fanning wrote:
>
> Stein Vidar Hagfors Haugan (shaugan@esa.nascom.nasa.gov) writes:
>
>> And what if the event_pro tries to communicate with you in the mean time?
>> Probably safer with
>>
>> thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
>>
>> event_pro=state.event_pro
>> WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
>> IF event_pro NE "" THEN BEGIN
>> Call_Procedure, event_pro, thisEvent
>> thisEvent = 0
>> END
>> RETURN, thisEvent
>
> Oh, well, something like this... :-)
>
> Cheers,
>
> David
>
> P.S. Let's just say it's going too far to correct
> a correction of your own incorrect post. :-(
>
> --
> David Fanning, Ph.D.
> Fanning Software Consulting
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com/
> Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: cw_fslider [message #24203 is a reply to message #13949] |
Thu, 15 March 2001 10:24  |
Stein Vidar Hagfors H[1]
Messages: 56 Registered: February 2000
|
Member |
|
|
davidf@dfanning.com (David Fanning) writes:
> David Fanning (davidf@dfanning.com) writes:
>
[..........]
> Whoops! Of course, you have to put the state structure back. The code
> should really look like this:
>
> thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
> IF state.event_pro NE "" THEN BEGIN
> Call_Procedure, state.event_pro, thisEvent
> thisEvent = 0
> ENDIF
> WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
> RETURN, thisEvent
And what if the event_pro tries to communicate with you in the mean time?
Probably safer with
thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
event_pro=state.event_pro
WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
IF event_pro NE "" THEN BEGIN
Call_Procedure, event_pro, thisEvent
thisEvent = 0
END
RETURN, thisEvent
--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO
NASA Goddard Space Flight Center, Email: shaugan@esa.nascom.nasa.gov
Mail Code 682.3, Bld. 26, Room G-1, Tel.: 1-301-286-9028/240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
|
|
|
Re: cw_fslider [message #24204 is a reply to message #24203] |
Thu, 15 March 2001 10:56  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stein Vidar Hagfors Haugan (shaugan@esa.nascom.nasa.gov) writes:
> And what if the event_pro tries to communicate with you in the mean time?
> Probably safer with
>
> thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
>
> event_pro=state.event_pro
> WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
> IF event_pro NE "" THEN BEGIN
> Call_Procedure, event_pro, thisEvent
> thisEvent = 0
> END
> RETURN, thisEvent
Oh, well, something like this... :-)
Cheers,
David
P.S. Let's just say it's going too far to correct
a correction of your own incorrect post. :-(
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: cw_fslider [message #24205 is a reply to message #13949] |
Thu, 15 March 2001 07:03  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
David Fanning (davidf@dfanning.com) writes:
> Then, find these two lines at the bottom of the event handler:
>
> WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
> RETURN, { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
>
> Modify these two line to these:
>
> thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
> IF state.event_pro NE "" THEN BEGIN
> Call_Procedure, state.event_pro, thisEvent
> thisEvent = 0
> ENDIF
> RETURN, thisEvent
Whoops! Of course, you have to put the state structure back. The code
should really look like this:
thisEvent = { ID:parent, TOP:ev.top, HANDLER:0L, VALUE:value, DRAG:drag }
IF state.event_pro NE "" THEN BEGIN
Call_Procedure, state.event_pro, thisEvent
thisEvent = 0
ENDIF
WIDGET_CONTROL, stash, SET_UVALUE=state, /NO_COPY
RETURN, thisEvent
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|