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

Home » Public Forums » archive » Re: pulldown menu with multiple selections - Yes we can!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: pulldown menu with multiple selections - Yes we can! [message #17595 is a reply to message #17558] Tue, 02 November 1999 00:00 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Michael Asten wrote:

> pei zeng wrote:
>
>> Hi, Guys
>>
>> Does anybody know how to make a pulldown menu with multiple selections?
>>
>> Thanks!
>>
>> pei
>
> I did it using the pull down menu generated by the idl5.2 GuiBuilder,
> with
> subsequent addition to code to extract the "multiple" selection.
> Attached is a demo example - the task is to select multiple 'loops'
> from
> the left column of a widget, and single 'line' and 'component' from 2nd
> and
> 3rd columns of the widget.

Dear Michael,

this is a bit more modern code of your widget.
The arrangement of the widget was done by the GUI Builder too. An important
difference to your code is
thats the ids of the widget function are organized in a structure which is
the uvalue of the main base.
I am prefering pointer instead of a common block.


Unfortunately this was not the answer of the question.

Regards

R.Bauer


PRO list_ex_event, Event
WIDGET_CONTROL,event.top,get_uvalue=map

CASE event.id OF
(*map).id_show: BEGIN
idx=WIDGET_INFO((*map).id_list,/list_select)
PRINT,(*map).data.list_value[idx]
END
(*map).id_done: WIDGET_CONTROL,event.top,/destroy
ELSE:
ENDCASE
END

PRO list_ex


map=CREATE_STRUCT('id_base_0',WIDGET_BASE(SCR_XSIZE=300 ,SCR_YSIZE=200 ,$
TITLE='list example' ,SPACE=3 ,XPAD=3 ,YPAD=3))

value=['alpha','beta','gamma','delta']
map=CREATE_STRUCT(map,'id_list',WIDGET_LIST(map.id_base_0, Uvalue='LIST'
,$
XOFFSET=9 ,YOFFSET=10 ,SCR_XSIZE=118 ,SCR_YSIZE=138 ,XSIZE=11
,YSIZE=2,$
value=value,/multiple))


map=CREATE_STRUCT(map,'id_show', WIDGET_BUTTON(map.id_base_0,
Uvalue='SHOW', $
XOFFSET=151 ,YOFFSET=18 ,/ALIGN_CENTER ,VALUE='SHOW'))


map=CREATE_STRUCT(map,'id_done', WIDGET_BUTTON(map.id_base_0,
Uvalue='DONE', $
XOFFSET=151 ,YOFFSET=48 ,/ALIGN_CENTER ,VALUE='DONE'))

map=CREATE_STRUCT(map,'Data',CREATE_STRUCT('list_value',valu e))
map=PTR_NEW(TEMPORARY(map))

WIDGET_CONTROL, /REALIZE, (*map).id_BASE_0,set_uvalue=map

XMANAGER, 'list_ex', (*map).id_BASE_0
ptr_free,map

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bounding Box in IDL postscript output
Next Topic: CGM files

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

Current Time: Wed Oct 08 19:29:17 PDT 2025

Total time taken to generate the page: 0.00428 seconds