class-inheritance-$17.lzx

<canvas height="120" width="100%">
  <class name="mybox">
    <view bgcolor="${parent.bgcolor}" width="50" height="50"/>
  </class>
  
  <view name="redbox" bgcolor="red" width="100" height="100"/>
  
  <!-- Create new lz.mybox with cyan bgcolor and place it in canvas.redbox. -->
  <button x="110" text="add cyan" onclick="if (canvas.redbox['cyan'] == null)                         new lz.mybox(canvas.redbox, { name: 'cyan', bgcolor: 0x00ffff })"/>

  <!-- Remove cyan view from redbox. -->
  <button x="110" y="30" text="remove cyan" onclick="if (canvas.redbox['cyan'] != null) canvas.redbox.cyan.destroy()"/>

</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Classes

Named Instances