shadowbox.lzx

<library>
      
    <resource name="shadow_rsc" src="resources/shadowbox/shadow_inset.png"/>
    <resource name="shadow_rsc_vert" src="resources/shadowbox/shadow_inset_vert.png"/>
      
    <!--- A basic container view with an inner dropshadow effect.
        <example executable="false">
            &lt;shadowbox width="200" height="200"&gt;
                &lt;view bgcolor="red" width="200" height="200"/&gt;
            &lt;/shadowbox&gt;
        </example>
    -->
    <class name="shadowbox" bgcolor="white">
        
        
        <!--- @keywords private -->
        <attribute name="defaultplacement" value="content" type="string"/>

        <!--- bgcolor of one pixel wide border on right and bottom sides only -->
        <attribute name="edgecolor_tl" value="null"/><!-- -->

        <!--- bgcolor of one pixel wide border on right and bottom sides only -->
        <attribute name="edgecolor" value="0xD9D9D9"/><!-- -->
        
        <!--- display shadow along left side -->
        <attribute name="shadowleft" value="false"/>
        
        <view name="content" width="100%" height="100%" clip="true"/>

        <!-- top and left borders -->
        <view bgcolor="${classroot.edgecolor_tl}" width="100%" height="1"/>
        <view bgcolor="${classroot.edgecolor_tl}" width="1" height="100%"/>
              
        <!-- right and bottoms borders -->
        <view bgcolor="${classroot.edgecolor}" y="${parent.height - 1}" width="100%" height="1"/>
        <view bgcolor="${classroot.edgecolor}" x="${parent.width - 1}" width="1" height="100%"/>

        <!-- pixel to correct for shadow overlay -->
       <view width="1" height="1" bgcolor="black" opacity=".45"/> 
        
        <!-- shadows on left and top -->
        <view resource="shadow_rsc" x="0" width="${parent.width}" stretches="width"/>
        <view resource="shadow_rsc_vert" y="0" height="${parent.height}" stretches="height" visible="${classroot.shadowleft}"/> 
    </class>

</library>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2006-2007, 2009 Laszlo Systems, Inc. All Rights Reserved.               *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
<!-- @LZX_VERSION@                                                         -->

Cross References

Resources

Name Source Image
shadow_rsc resources/shadowbox/shadow_inset.png
shadow_rsc_vert resources/shadowbox/shadow_inset_vert.png

Classes