layout-and-design-$11.lzx
<canvas width="100%">
<class name="floater" height="20" bgcolor="0x93A5FF" visible="false">
<dragstate name="dragger"/>
<text name="txt" width="100"/>
<method name="showFloater" args="xpos, ypos, itemwidth, itemlabel">
myfloater.bringToFront();
this.setAttribute("x", xpos);
this.setAttribute("y", ypos);
this.setAttribute("width", itemwidth);
this.txt.setAttribute("text", itemlabel);
this.gm = new LzDelegate(this, "cancelFloater", lz.GlobalMouse, "onmouseup");
this.setAttribute("visible", true);
this.dragger.apply();
</method>
<method name="cancelFloater" args="v">
this.dragger.remove();
this.setAttribute("visible", false);
</method>
</class>
<floater id="myfloater"/>
<class name="imageRow" bgcolor="0x93A5FF" width="$once{parent.width}" height="20">
<attribute name="text" type="text"/>
<text name="txt" text="${parent.text}" resize="true"/>
<handler name="onmousedown">
myfloater.showFloater(this.getAttributeRelative("x", canvas),
this.getAttributeRelative("y", canvas),
this.width,
this.txt.text);
</handler>
</class>
<view>
<view name="stage" width="400" height="300" x="20" bgcolor="0xeaeaea">
<text>Stage</text>
</view>
<view name="listOfImages" width="200" height="300" x="500" bgcolor="0xffff00">
<simplelayout axis="y" spacing="2"/>
<imageRow>One</imageRow>
<imageRow>Two</imageRow>
<imageRow>Three</imageRow>
</view>
<view name="trash" width="200" height="75" x="500" y="310" bgcolor="0xff0000">
<text>Trash</text>
</view>
</view>
</canvas>
Cross References
Classes
Named Instances