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

Home » Public Forums » archive » Re: Widget_List question ...
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: Widget_List question ... [message #12661 is a reply to message #12645] Fri, 07 August 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Darran (darran@my-dejanews.com) writes:

> By initiating Widget_List without a value field, viz.
>
> list = widget_list(base)
>
> I obtain a list box with no selectable items - fine.
> However, if I now add some elements to the listbox, it
> doesn't seem possible to get back to this "null" state.
> I've tried to get back to a null list via calls like
>
> widget_control, list, set_value=ptr_new()
> widget_control, list, set_value=strarr(0)
> widget_control, list, set_value=strarr()
>
> with no success. The following gives a selectable
> blank:
>
> widget_control, list, set_value=''
>
> Since IDL doesn't allow one to query the value of
> a widget_list, I cannot extract the initial value
> and discover its type.

It is not at all clear to me why you would WANT to
be doing this, but how about this:

Widget_Control, list, /Destroy
list = Widget_List(base)

Cheers,

David

P.S. Those of you who have heard me preach over and over
to NEVER destroy a widget sub-hierarchy will be pleased
to learn that "NEVER" means "almost NEVER". RSI assures
me that you can get away with this behavior now in almost
every case. I still cringe when I recommend it, but it
has proven useful in several examples lately. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438, Toll Free Book Orders: 1-888-461-0155
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: Reverse axis,
Next Topic: Re: combining object and direct graphics

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

Current Time: Thu Oct 09 04:52:16 PDT 2025

Total time taken to generate the page: 2.48190 seconds