list widget [message #21496] |
Tue, 29 August 2000 00:00  |
zeraph
Messages: 6 Registered: May 2000
|
Junior Member |
|
|
Wow, you guys are getting a bit philosophical here. This is my first
posting and OK you definitely have my respect, but could you possibly
lower yourself to helping with questions like 'Why I don't get multiple
element output from my list widget?' please?
Here is my widget_definition:
Widget_list(tlb,sensitive=1,/multiple,ysize=26,event_pro='an ypro')
So I get my array of filenames into my list widget and then try to
select four files by left click + shift left click below (or just
dragging the cursor) so it highlights the desired four file names and
the event.index only gives the index of the last filename.
Is there something obvious I'm doing/not doing or some secret IDL kung
fu I could perform to get it to work?
Thanks very much,
Stu.
(Of the DF academy of IDL programmers)
Sent via Deja.com http://www.deja.com/
Before you buy.
|
|
|
|
|
|
Re: list widget [message #21539 is a reply to message #21496] |
Wed, 30 August 2000 23:13   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Stuart Robertson wrote:
>
> Wow, you guys are getting a bit philosophical here. This is my first
> posting and OK you definitely have my respect, but could you possibly
> lower yourself to helping with questions like 'Why I don't get multiple
> element output from my list widget?' please?
>
> Here is my widget_definition:
> Widget_list(tlb,sensitive=1,/multiple,ysize=26,event_pro='an ypro')
>
Dear Stuart,
we are using a compound widget to select from a list.
You can do a selection by typing something in the text field.
Example:
PRO test_event,ev
WIDGET_CONTROL,ev.id,get_uval=cmd
WIDGET_CONTROL,ev.top,get_uvalue=b
CASE cmd OF
'done':BEGIN
WIDGET_CONTROL,b,get_value=v
IF v.list_selected[0] NE -1 THEN PRINT,v.list[v.list_selected]
WIDGET_CONTROL,ev.top,/dest
END
'FF':BEGIN
WIDGET_CONTROL,ev.id,get_value=v
IF v.button_pressed EQ 1 THEN BEGIN
replace_tag,v,'list_selected','list_selected',INDGEN(2)
WIDGET_CONTROL,ev.id,set_value=v
ENDIF
END
ELSE:
ENDCASE
END
PRO test
a=WIDGET_BASE(row=2,/frame)
value={label:'[0,1]',list:STRTRIM(SINDGEN(40),2),text:'',but ton:'PRESELECTION',$
list_selected:-1,button_pressed:0,description:'TEST'}
b=cw_list(a,value=value,uvalue='FF',frame=2, XOFFSET=9,$
YOFFSET=15 ,SCR_XSIZE=140 ,SCR_YSIZE=200,$
/text_all_events, text_xsize=19,/text_editable, $
/list_multiple,list_ysize=10,list_xsize=20,$
label_xsize=100,$
button_ysize=20 )
d=WIDGET_BUTTON(a,val='done',uval='done')
WIDGET_CONTROL,/realize,a,set_uvalue=b
XMANAGER,'test',a
END
For further routines copyright and licence.
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
The routine itselfs.
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/cw_list.tar.gz
The routine as loadable module.
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/cw_list.sav
Reimar
-
Attachment: CW_LIST.GIF
(Size: 3.09KB, Downloaded 106 times)
|
|
|
|
|