A
download dynapi.api.dynlayer-anchor.html
Language: NonCode
LOC: 0
Project Info
DynAPI
Server: SourceForge
Type: cvs
...i\dynapi\dynapi3x\examples\
   datasource-paging.db
   datasource.db
   ...cross_frame_access.html
   ...me_access_-_frame1.html
   ...me_access_-_frame2.html
   ...dragdrop-collision.html
   demo.dragicon.html
   demo.dragover.html
   demo.dynlayer-attack.html
   ....dynlayer-dragdraw.html
   demo.oncontentchange.html
   demo.onlocationchange.html
   demo.slideshow.html
   demo.spaceship-circle.html
   demo.spaceship-path.html
   ...emplate.imageframe.html
   ...yndocument-addhtml.html
   ...r-anchor-anchoring.html
   ...dynlayer-anchor-ii.html
   ...-anchor-stretching.html
   ...pi.dynlayer-anchor.html
   ....dynlayer-autosize.html
   ...ynlayer-blackboard.html
   ...pi.dynlayer-create.html
   ...i.dynlayer-destroy.html
   ....dynlayer-relative.html
   ...api.dynlayer-slide.html
   ....api.ext.dragevent.html
   ....ext.inline-widget.html
   dynapi.api.ext.inline.html
   ....api.ext.keyevents.html
   ...pi.ext.tabmanager1.html
   ...pi.ext.tabmanager2.html
   dynapi.api.mouseevent.html
   ...ment.capturehotkey.html
   ...unctions.fadecolor.html
   ...functions.getimage.html
   dynapi.functions.html
   ...ctions.imageloader.html
   ...ions.subclassevent.html
   dynapi.fx.bezier.html
   dynapi.fx.circleanim.html
   dynapi.fx.fader.html
   dynapi.fx.flashsound.html
   dynapi.fx.glideanim.html
   dynapi.fx.hover.html
   dynapi.fx.motionx.html
   dynapi.fx.pathanim.html
   dynapi.fx.slideanim.html
   dynapi.fx.snapx.html
   dynapi.fx.swiper.html
   dynapi.fx.textanim.html
   dynapi.fx.timerx.html
   ...rdermanager-boxfix.html
   ...ordermanager-inner.html
   ...ordermanager-outer.html
   ...rdermanager-random.html
   dynapi.gui.button.html
   dynapi.gui.checkbox.html
   dynapi.gui.explorer.html
   ...i.gui.focusmanager.html
   dynapi.gui.graphics.html
   ...i.gui.groupmanager.html
   ...pi.gui.highlighter.html
   dynapi.gui.htmlbutton.html
   ...i.gui.htmlcalendar.html
   ...i.gui.htmlcheckbox.html
   dynapi.gui.htmlclock.html
   ...ui.htmlcolorpicker.html
   ....gui.htmlcontainer.html
   ...gui.htmldatepicker.html
   ...i.htmldropdownmenu.html
   dynapi.gui.htmlfile.html
   ....gui.htmlhyperlink.html
   ...pi.gui.htmllistbox.html
   ...ui.htmlmenu-images.html
   ...htmlmenu-startmenu.html
   dynapi.gui.htmlmenu.html
   ...ui.htmlprogressbar.html
   ...ui.htmlradiobutton.html
   ...i.gui.htmlrollover.html
   ...i.gui.htmltextarea.html
   ...pi.gui.htmltextbox.html
   dynapi.gui.imageclip.html
   dynapi.gui.knob.html
   dynapi.gui.label.html
   dynapi.gui.list.html
   dynapi.gui.listbox.html
   dynapi.gui.loadpanel.html
   dynapi.gui.marquee.html
   ...i.panelbar-stacker.html
   ...pi.gui.progressbar.html
   ...pi.gui.radiobutton.html
   dynapi.gui.scrollbar.html
   ...emplatemanager-htc.html
   ...ui.templatemanager.html
   dynapi.gui.tree.html
   ....viewpane-explorer.html
   ...viewpane-loadpanel.html
   dynapi.gui.viewpane.html
   dynapi.library-file1.js
   dynapi.library-file2.js
   dynapi.library-load.html
   dynapi.util.cookie.html
   ...atasource-acronyms.html
   ...il.datasource-forms.asp
   ...l.datasource-forms.html
   ...l.datasource-paging.asp
   ....datasource-paging.html
   ...atasource-testfile.html
   ...pi.util.datasource.html
   ...pi.util.filereader.html
   dynapi.util.filereader.xml
   ...ement-dynamic-code.html
   ...ement-dynamic-data.html
   ...til.ioelement-post.html
   ...lement-postresponse.asp
   ...lement-postresponse.php
   ...element-postresponse.pl
   ...lement-soda-calc-js.asp
   ...ement-soda-calc-vbs.asp
   ...ioelement-soda-calc.php
   ...oelement-soda-sync.html
   ...ment-soda-tester-vb.asp
   ...lement-soda-tester.html
   ...element-soda-tester.php
   ...til.ioelement-soda.html
   ...ioelement-testfile.html
   ...il.ioelement-upload.asp
   ...l.ioelement-upload.html
   ...il.ioelement-upload.php
   dynapi.util.ioelement.html
   ....util.stringbuffer.html
   ioelmsrv.jscript.asp
   ioelmsrv.php
   ioelmsrv.pl
   ioelmsrv.pm
   ioelmsrv.soda.jscript.asp
   ioelmsrv.soda.php
   ioelmsrv.soda.pl
   ioelmsrv.soda.vbscript.asp
   ioelmsrv.vbscript.asp
   speedtest.button.html
   speedtest.checkbox.html
   ...est.dynlayer-basic.html
   ...dynlayer-deep_nest.html
   ....dynlayer-oncreate.html
   ...yer-setclass-basic.html
   ...-basic-blueprint_def.js
   ...-basic-blueprint_ns4.js
   ...r.inline-basic-dom.html
   ...layer.inline-basic.html
   ...line-deep_nest-dom.html
   ...etcontentwidth.dom.html
   speedtest.knob.html
   speedtest.listbox.html
   speedtest.radiobutton.html
   speedtest.scrollbar.html
   ...reatewidget.button.html
   upload.asp

<html>

<head>
<title>DynAPI Examples - DynLayer Anchor</title>
<script language="JavaScript" src="../src/dynapi.js"></script>
<script language="Javascript">
dynapi.library.setPath('../src/');
dynapi.library.include('dynapi.debug');
dynapi.library.include('dynapi.library');
dynapi.library.include('dynapi.api');
dynapi.library.include('DragEvent');
</script>
<script language="Javascript">

var bb = new DynLayer();
bb.setBgColor('black');
bb.setAnchor({left:1,right:1,top:1,bottom:1});

var main = new DynLayer();
main.setBgColor('#999999');
main.setAnchor({left:1,right:1,top:1,bottom:1});
bb.addChild(main);

var anchorlayer = new DynLayer();
anchorlayer.setBgColor('black');
anchorlayer.setSize(200,100);
anchorlayer.setLocation(100,100);

var nw = anchorlayer.addChild( new DynLayer() );
nw.setBgColor('yellow');
nw.setSize(15,15);
nw.setAnchor({left:0,top:0});

var ne = anchorlayer.addChild( new DynLayer() );
ne.setBgColor('yellow');
ne.setSize(15,15);
ne.setAnchor({right:0,top:0, bottom:0});

var sw = anchorlayer.addChild( new DynLayer() );
sw.setBgColor('yellow');
sw.setSize(15,15);
sw.setAnchor({left:0,bottom:0});

var se = anchorlayer.addChild( new DynLayer() );
se.setBgColor('yellow');
se.setSize(15,15);
se.setAnchor({right:0,bottom:0});

var n = anchorlayer.addChild( new DynLayer() );
n.setHeight(5);
n.setBgColor('green');
n.setAnchor({left:20,top:5,right:20});

var s = anchorlayer.addChild( new DynLayer() );
s.setHeight(5);
s.setBgColor('green');
s.setAnchor({left:20,bottom:5,right:20});

var e = anchorlayer.addChild( new DynLayer() );
e.setWidth(5);
e.setBgColor('green');
e.setAnchor({right:5,top:20,bottom:20});

var w = anchorlayer.addChild( new DynLayer() );
w.setWidth(5);
w.setBgColor('green');
w.setAnchor({left:5,top:20,bottom:20});

var cn = anchorlayer.addChild( new DynLayer() );
cn.setSize(20,10);
cn.setBgColor('red');
cn.setAnchor({top:15,centerH:0});

var cn = anchorlayer.addChild( new DynLayer() );
cn.setSize(20,10);
cn.setBgColor('red');
cn.setAnchor({top:15,centerH:0});

var cs = anchorlayer.addChild( new DynLayer() );
cs.setSize(20,10);
cs.setBgColor('red');
cs.setAnchor({bottom:15,centerH:0});

var ce = anchorlayer.addChild( new DynLayer() );
ce.setSize(10,20);
ce.setBgColor('red');
ce.setAnchor({right:15,centerV:0});

var cw = anchorlayer.addChild( new DynLayer() );
cw.setSize(10,20);
cw.setBgColor('red');
cw.setAnchor({left:15,centerV:0});

var chv = anchorlayer.addChild( new DynLayer() );
chv.setSize(20,20);
chv.setBgColor('blue');
chv.setAnchor({centerH:0,centerV:0});


var box = new DynLayer();
box.setBgColor('white');
box.setSize(100,100);
box.setAnchor({right:10,bottom:10});

var bluesquare = new DynLayer();
bluesquare.setBgColor('blue');
bluesquare.setSize(10,10);
bluesquare.setAnchor({left:0,top:0});
box.addChild(bluesquare);

main.addChild(box);

main.addChild(anchorlayer)

dynapi.document.addChild(bb);

dynapi.onLoad(init);
function init() {
	str = '// Try these tests:\n\n'+
	'anchorlayer.setLocation(50,50);\n'+
	'anchorlayer.setSize(300,200);\n'+
	'//anchorlayer.setAnchor({left:0,right:0,top:0,bottom:0});\n\n'+

	'bluesquare.setSize(10,10);  // must reset size if it is no longer 10x10\n\n'+
	'// Align:\n'+
	'bluesquare.setAnchor({right:0,bottom:0});\n'+
	'//bluesquare.setAnchor({right:0,top:0});\n'+
	'//bluesquare.setAnchor({left:0,top:0});\n'+
	'//bluesquare.setAnchor({left:0,bottom:0});\n'+
	'// Strech:\n'+
	'//bluesquare.setAnchor({left:0,right:0,bottom:0});\n'+
	'//bluesquare.setAnchor({left:0,right:0,top:0});\n'+
	'//bluesquare.setAnchor({left:0,top:0,bottom:0});\n'+
	'//bluesquare.setAnchor({right:0,top:0,bottom:0});\n'+
	'// Center:\n'+
	'//bluesquare.setAnchor({centerV:0,centerH:0});\n';
	dynapi.debug.setEvaluate(str);
}

</script>
</head>
<body bgcolor="white">

<script>
dynapi.document.insertAllChildren();
</script>

</body>
</html>

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us