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

Home » Public Forums » archive » widgets and values
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
widgets and values [message #25943] Fri, 27 July 2001 13:35 Go to previous message
Ralf Schaa is currently offline  Ralf Schaa
Messages: 37
Registered: June 2001
Member
Hi there,

i like to have a widget doing the following:

PROBLEM1:
if the button 'range1' has been pushed, then change the UVALUE from
'range' to 'range1'
if the button 'range2' has been pushed, then change the UVALUE from
'range' to 'range2'
...
depending on the new uservalues in another program the rangings of the
plots are been set...
but for some reason it won't work, and actually i think to do it with
the UVALUE's isn't a bad idea, is it?

PROBLEM2:
when the USERVALUE's have been set,
i'd like to have a message like:"uservalue is now range1"
see the source below how i tried to do that


any suggestions? :-/

Ralf

some snipsnaps of the source:
--------------------------------------------------
PRO clus
...

desc1=REPLICATE({flags:0,name:' '},4)
desc1.flags=[1,0,0,2]
desc1.name=['Range','range1','range2','userrange']

...

but(8) =
CW_PDMENU(pan1,desc1,UVALUE='range',/RETURN_INDEX,FONT=butfo nt)
...
--------------------------------------------------
PRO clus_event
...
WIDGET_CONTROL,eve.id,GET_UVALUE=uval
;
CASE uval OF
"range" : BEGIN
CASE eve.value OF
1 : SET_UVALUE='range1' , PRINT, 'uservalue is now range1'
2 : SET_UVALUE='range2'
3 : SET_UVALUE='userrange'
ENDCASE
...
-------------------------------------------------
PRO plot
...
IF (UVALUE EQ 'range1') THEN BEGIN
;B_x
index=0
yranmax=[1024.,512.,256.,128.,64.,32.,16.,8.,4.,2.,1.]
IF maxmag0 GT 2048. THEN yrange = [0.,2048.] ELSE BEGIN
WHILE (yranmax(index) GE maxmag0) AND (index LT 10) DO BEGIN
print,'yranmax',yranmax(index),maxmag0
yrange0=[0.,yranmax(index)]
index=index+1
ENDWHILE
ENDELSE
...
ENDIF
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Overlaying filled contour plots
Next Topic: How to organize client-server IDL application?

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

Current Time: Fri Dec 05 05:15:56 PST 2025

Total time taken to generate the page: 0.01337 seconds