Re: Deleteiing an item from the Widget_DropList [message #46676] |
Tue, 06 December 2005 17:04 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
akkiraju writes:
> I need some help on how we can delete an item at a particular
> index from a WIDGET_DROPLIST.
>
>
> I have the index of the selected item from the 'Event'
> argument to the Widget_DropList's 'nSelectValue' event handler.
>
>
> Any way I can use this index and Widget_Control to delete a
> particular item from my DropList.
From the Histogram Tutorial:
keep = Where(Histogram([event.index], Min=0, $
Max=N_Elements(listItems)-1) EQ 0, count)
IF count NE 0 THEN listItems = listItems[keep]
Widget_Control, dropListID, Set_Value=listItems
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|