I wrote a simple solution that seems to be working well
sofar. Next I'll try to make it remember (lastScrollPos) what the last
scroll position was instead of having to reset it every time a node is
closed. n/t
<view height="235" width="100%" clip="true">
<view id="eventHolder">
<view id="eventHolder">
<!-- <attribute name="lastScrollPos"
type="number" value="0" /> -->
<tree x="40" id="tree_search" datapath="ds_search:/page/root" showroot="false">
<tree icon="lztree_folder_rsc" datapath="package-do" closesiblings="true">
<tree x="40" id="tree_search" datapath="ds_search:/page/root" showroot="false">
<tree icon="lztree_folder_rsc" datapath="package-do" closesiblings="true">
<method
event="onclick">
eventHolder.setAttribute('y', -this.y); //scroll container view so this node is at top
if(!this.open) //if closing this node, reset container view scroll position to zero
eventHolder.setAttribute('y', 0);
</method>
eventHolder.setAttribute('y', -this.y); //scroll container view so this node is at top
if(!this.open) //if closing this node, reset container view scroll position to zero
eventHolder.setAttribute('y', 0);
</method>
.......
Can someone
explain the tree autoscroll attribute to me. I'm looking for a way to display a
tree node's contents if when expanding the contents are clipped...I'm hoping
autoscroll would scroll the tree upwards so the subnodes are displayed. Sofar my
experiments haven't showed any results:
<view
height="235" width="100%" clip="true">
<view id="eventHolder" clip="true">
<tree x="40" id="tree_search" datapath="ds_search:/page/root" showroot="false" autoscroll="true">
<tree icon="lztree_folder_rsc" datapath="package-do" closesiblings="true" autoscroll="true">
<view id="eventHolder" clip="true">
<tree x="40" id="tree_search" datapath="ds_search:/page/root" showroot="false" autoscroll="true">
<tree icon="lztree_folder_rsc" datapath="package-do" closesiblings="true" autoscroll="true">
_______________________________________________ Laszlo-user mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-user
