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

Home » Public Forums » archive » widget_droplist
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
widget_droplist [message #28508] Fri, 07 December 2001 06:56
robert.dimeo is currently offline  robert.dimeo
Messages: 42
Registered: November 2001
Member
Hi,

I have run into a problem with the widget_droplist function in IDL 5.4
on a Mac running OS 9.2.1. A small example program called
droptest.pro is listed below this message. The droplist contains a
string array of values, in this case 3 curve names. When you select a
curve in the droplist, the name of the curve is printed in the output
log (in IDLDE). However when you select the SAME curve twice (just
after selecting it the first time), IDL seems to ignore the second
selection. In fact it seems that NO event is generated the second
time. This works as I expect it to on IRIX, LINUX, and WINDOWS
platforms but not the MAC.

The on-line help has the following statement:

"Note - Platform-specific UI toolkits behave differently if a droplist
widget has only a single element. On some platforms, selecting that
element again does not generate an event. Events are always generated
if the list contains multiple items."

However when I use widget_info, IDL recognizes that there are 3 items
in the droplist. So the on-line help doesn't seem to be too useful
here.

Do any of you widget experts out there have any thoughts?

Regards,

Rob

;;;;;;;;;;;;;;example code starts here;;;;;;;
; pro dropTest
;
; Test of behavior of the droplist widget. When you
; make a selection, the name of the curve selected should
; be chosen. However on the MAC, when you select the same
; choice twice, IDL ignores the second event.
;
;
; Written by R.M.Dimeo (12/07/01)
;;;;;;;;;;;;;;;;;;;;;
pro dropTestQuit,event
widget_control,event.top,/destroy
return
end
;;;;;;;;;;;;;;;;;;;;;
pro dropTestEvent,event
case event.index[0] of
0: begin
print,'pseudo-delta function'
end
1: begin
print,'Gaussian'
end
2: begin
print,'Lorentzian'
end
else:
endcase
return
end
;;;;;;;;;;;;;;;;;;;;;
pro dropTest
tlb = widget_base(/col,title = 'Droplist Widget Test',$
tlb_frame_attr = 1)
butsize = 250
curveNames = ['pseudo delta function',$
'Gaussian', 'Lorentzian']
drop = widget_droplist(tlb, VALUE=curveNames,xsize = butsize,$
event_pro = 'dropTestEvent')
quit = widget_button(tlb,xsize = butsize,value = 'QUIT',$
event_pro = 'dropTestQuit')
widget_control,tlb,/realize
xmanager,'dropTest',tlb
end
[Message index]
 
Read Message
Previous Topic: Re: data file to postscript
Next Topic: ThreeJ Symbol

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

Current Time: Wed Oct 08 14:58:25 PDT 2025

Total time taken to generate the page: 0.00329 seconds