[Laszlo-dev] Help swapping order of subviews
Henry Minsky
henry.minsky at gmail.com
Sun Jul 8 08:40:18 PDT 2007
I am trying to make a horizontal "dock" of icons, where the user can drag
and drop them to re-order them.
I have a view which has a horizontal simplelayout, and I thought I could
just swap two elements of the subviews
array and call update() on the layout, and they would snap into a new order,
but that doesn't seem to work.
If I swap two views in the subviews array, then rerun the layout's update()
method, the views report properly
changed x coordinates, but they still display at their original locations.
Is there some cache I don't know about
which a view keep for it's children's postitions?
Here's my scrolling view
<class name="scrollview" defaultplacement="content" clip="true"
focusable="true">
<attribute name="scrollto" value="0" type="number"/>
<view x="${-parent.scrollto}" name="content" >
<simplelayout name="mylayout" axis="x"/>
</view>
<scrollbar name="sbx" axis="x" y="120"/>
<method name="updatelayout">
this.content.mylayout.update();
</method>
</class>
--
Henry Minsky
Software Architect
hminsky at laszlosystems.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20070708/b688701f/attachment.html
More information about the Laszlo-dev
mailing list