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

Home » Public Forums » archive » Re: Deleting objects from widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Deleting objects from widgets [message #49942] Mon, 28 August 2006 08:39
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ChristopherFlorio@gmail.com writes:

> Currently I have using a widget_list in a GUI. It would be advantageous
> if I could setup the list such that when I press the delete key the
> select list item is removed and an event is triggered. Does anyone know
> if this is at all possible?

Here is an article that describes one way to add and
delete items from a list widget dynamically:

http://www.dfanning.com/widget_tips/dynamic_menus.html

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. (Opata Indian saying, meaning "Perhaps thou
speakest truth.")
Re: Deleting objects from widgets [message #49943 is a reply to message #49942] Mon, 28 August 2006 07:37 Go to previous message
Tom S. is currently offline  Tom S.
Messages: 9
Registered: June 2006
Junior Member
Try using the SET_VALUE keyword in the WIDGET_CONTROL procedure.

i.e.

new_list = ['item 1', 'item 2', 'item 3']
WIDGET_CONTROL, list_widget, SET_VALUE=new_list

Note that you can't retrieve the list using GET_VALUE, you can only set
it.
Thus, you'd have to keep track of the list separately. When a delete
event is received you can delete the item from the separate list, and
then re-set the list widget's value as shown above.

Cheers,
Tom

ChristopherFlorio@gmail.com wrote:
> Currently I have using a widget_list in a GUI. It would be advantageous
> if I could setup the list such that when I press the delete key the
> select list item is removed and an event is triggered. Does anyone know
> if this is at all possible?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Deleting objects from widgets
Next Topic: Changing the color of area outside the "projected" map area

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

Current Time: Wed Oct 08 20:02:33 PDT 2025

Total time taken to generate the page: 0.03035 seconds