GUI Components JavaScript DHTML



DynAPI Examples - Explorer


  dynapi.library.setPath('./dynapisrc/');
  dynapi.library.include('dynapi.api');
  dynapi.library.include('dynapi.gui.BorderManager');
  dynapi.library.include('Explorer');
  dynapi.library.include('ExplorerBlockStyle'); //Optional


  var  s = Styles.getStyle('Explorer');
  var file1 = s.getStyleAttribute('imageFile');
  var env = dynapi.functions.getImage('./dynapiexamples/images/envelope.gif',15,18);
  var exp = new Explorer(70,100);
  exp.setBgColor('#EEEEEE');
  exp.addLeave("root","Root Folder");
    // Groceries
    exp.addLeave("groc","Groceries","root");
    exp.addLeave("flour","Flour","groc",file1);
    exp.addLeave("sugar","Sugar","groc",file1);
    exp.addLeave("choc","Chocolate","groc",file1);
      // Cakes
      exp.addLeave("cake","Cakes","groc");
      exp.addLeave("plain","Plain Cake","cake",file1);
      exp.addLeave("ccake","Chocolate Cake","cake",file1);
    // Fruits
    exp.addLeave("fruit","Fruits","root");
    exp.addLeave("mango","Mango","fruit",file1);
    exp.addLeave("apple","Apple","fruit",file1);
    exp.addLeave("grape","Grapes","fruit",file1);
  exp.addEventListener({
    onselect : function(e) {
      status=("Current ID is: "+e.getSource().currentPos+" and currentUrl is: "+e.getSource().currentUrl);
    }
  });
  dynapi.document.addChild(exp);
  var exp2 = new Explorer(270,100,null,null,'ExplorerBlock');
  exp2.addLeave("root",'Emails');
    // Groceries
    exp2.addLeave("ib",'Inbox',"root");
    exp2.addLeave("flour",'Just stop to say Hi..
Be of good cheer
',"ib",env);
    exp2.addLeave("sugar",'This is a very long message
with a lot of 
breaks...
',"ib",env);
    exp2.addLeave("choc",'Chocolate',"ib",env);
      // Cakes
      exp2.addLeave("ar",'Archive',"ib");
      exp2.addLeave("plain",'Plain Cake',"ar",env);
      exp2.addLeave("ccake",'Chocolate Cake',"ar",env);
    // Fruits
    exp2.addLeave("ob",'Outbox',"root");
    exp2.addLeave("mango",'Mango',"ob",env);
    exp2.addLeave("apple",'Apple',"ob",env);
    exp2.addLeave("grape",'Grapes',"ob",env);
  dynapi.document.addChild(exp2);






           
         
  
dynapi.zip( 791 k)