layout-and-design-$2.lzx

<canvas height="140" width="100%">
  <class name="coloredRect" width="20" height="80" onclick="this.setAttribute('width', this.width+2)"/>
  <view x="10" y="10" name="container">
    <simplelayout axis="x" spacing="10"/>
    <coloredRect bgcolor="red"/>
    <coloredRect bgcolor="aqua"/>
    <coloredRect bgcolor="yellow"/>
    <coloredRect bgcolor="green"/>
    <coloredRect bgcolor="blue"/>
  </view>
  
  <button x="10" y="110">Create A New View
    <handler name="onclick">
      var newView = new lz.coloredRect(container, { bgcolor : 0x000000 });
    </handler>
  </button>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 - 2010 Laszlo Systems, Inc.  All Rights Reserved.            *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Classes

Named Instances