widget_layering.html

96 lines | 2.301 kB Blame History Raw Download
<HTML><HEAD>
	<SCRIPT>var isomorphicDir="../../isomorphic/";</SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Core.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Foundation.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Containers.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Grids.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_Forms.js></SCRIPT>
    <SCRIPT SRC=../../isomorphic/system/modules/ISC_DataBinding.js></SCRIPT>
	<SCRIPT SRC=../../isomorphic/skins/SmartClient/load_skin.js></SCRIPT>
</HEAD><BODY BGCOLOR='papayawhip' MARGINHEIGHT=0 MARGINWIDTH=0 LEFTMARGIN=0 TOPMARGIN=0>
<TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=5 BORDER=0><TR><TD CLASS=pageHeader BGCOLOR=WHITE>

	Dynamic layering example

</TD><TD CLASS=pageHeader ALIGN=RIGHT BGCOLOR=WHITE>

	Isomorphic SmartClient

</TD></TR></TABLE><TABLE WIDTH=100% CELLSPACING=0 CELLPADDING=0 BORDER=0><TR>
<TD BGCOLOR=336666><IMG SRC=images/blank.gif WIDTH=1 HEIGHT=4></TD></TR></TABLE>


<!--------------------------
  Example code starts here
---------------------------->

<SCRIPT>

Canvas.create({
    ID:"red",
    left:50,
    top:75,
    width:100,
    height:100,
    backgroundColor:"red"
});

Canvas.create({
    ID:"green",
    left:100,
    top:125,
    width:100,
    height:100,
    backgroundColor:"green"
});


Canvas.create({
    ID:"blue",
    left:150,
    top:175,
    width:100,
    height:100,
    backgroundColor:"blue"
});

Canvas.create({
    ID:"widget",
    left:200,
    top:225,
    width:100,
    height:100,
    backgroundColor:"khaki",
    contents:"widget<BR>(drag me)",
    canDragReposition:true,
    dragAppearance:"target"
});


//
//    buttons to manipulate the above
//

Button.create({    left:350,    top:75,    width:175,    height:30,    
    title:"widget.bringToFront()",click:"widget.bringToFront()"
});


Button.create({    left:350,    top:125,    width:175,    height:30,
    title:"widget.sendToBack()",    click:"widget.sendToBack()"
});


Button.create({    left:350,    top:175,    width:175,    height:30,
    title:"widget.moveAbove(green)",    click:"widget.moveAbove(green)"
});


Button.create({    left:350,    top:225,    width:175,    height:30,
    title:"widget.moveBelow(green)",    click:"widget.moveBelow(green)"
});

</SCRIPT>
</BODY>
</HTML>