Close nodes in Tree View widget

andrew at midwestcoastmedia.com andrew at midwestcoastmedia.com
Thu Jun 14 09:42:44 EDT 2018


Setting the arrayData to EMPTY acts the same as setting the arrayData  
to some other array: the open nodes remain open. I even tried changing  
the number of elements in the array to something as low as 1 but it  
still remembered what nodes had been open when setting the arrayData  
to something with more elements.

There are no properties in the dictionary that describe this type of  
operation. The closest I could find was hilitedElement but that  
doesn't actually open or close a node leaf. In fact, if you set the  
hilitedElement to a node that isn't open it will hilite the next node  
that is open instead. (bug?)

This isn't critical for this project as it is just an internal tool  
that only I use, but the only workaround I could come up with is to  
delete the widget and then create the widget again via script along  
with all the attributes.

--Andrew Bell


> Date: Wed, 13 Jun 2018 23:02:52 +0100
> From: Alex Tweedly <alex at tweedly.net>
> Subject: Re: Close nodes in Tree View widget
>
> I can't try it out right now - but would it be any good to set the
> arraydata to empty, and then load the new values you want ? That might
> (effectively) delete and recreate the relevant nodes, and thereby reset
> the status of the leaf nodes.
>
> Alex.
>







More information about the use-livecode mailing list