Re: Clearing widget_list of all entries [message #18937] |
Thu, 17 February 2000 00:00 |
Robert Weiss
Messages: 5 Registered: February 2000
|
Junior Member |
|
|
David Fanning wrote:
> Robert Weiss (weiss@mpia-hd.mpg.de) writes:
>
>> Does anyone of you know a way to clear a widget_list of all items ?
>> Using widget_control with set_value doesn't work since no string arrays
>> of zero
>> length are permitted in IDL.
>
> I should think Widget_Control, listWidgetID, Set_Value="" would
> do pretty much what you want. With, perhaps, some kind of
> check in the list event handler to not respond to any
> event that generated a null string for a value.
That's quite similar to what I did already (setting sensitivity to 0 for
lists containing only an empty string)
... I just felt it would be a nice (and logical) feature for
a list widget to be "emptiable" ;-) ... AND zero length arrays would come
in handy for a couple
of other problems as well (does anyone at RSI read this newsgroup?),
however, thanks a lot,
Robert.
|
|
|
Re: Clearing widget_list of all entries [message #18938 is a reply to message #18937] |
Thu, 17 February 2000 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Robert Weiss (weiss@mpia-hd.mpg.de) writes:
> Does anyone of you know a way to clear a widget_list of all items ?
> Using widget_control with set_value doesn't work since no string arrays
> of zero
> length are permitted in IDL.
I should think Widget_Control, listWidgetID, Set_Value="" would
do pretty much what you want. With, perhaps, some kind of
check in the list event handler to not respond to any
event that generated a null string for a value.
Or, if even this was too much list, you could put the list
widget in a bulletin-board base and simply unmap the base
widget. This would make the whole thing disappear, no matter
how many list items it contained.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|