<html>
<head>
<title>ActiveWidgets</title>
<script src="ActiveWidgets/runtime/lib/aw.js"></script>
<script src="DynarchMenu/hmenu-2.9/src/hmenu.js"></script>
<link href="ActiveWidgets/runtime/styles/xp/aw.css" rel="stylesheet"></link>
<link href="DynarchMenu/hmenu-2.9/src/skin-xp-extended.css" rel="stylesheet"></link>
</head>
<body onload="DynarchMenu.setup('menu', { electric: 1000, timeout: 0 });">
<script>
var obj = new AW.Grid.Extended;
obj.setCellText(function(i, j){return j + "." + i});
obj.setHeaderText("header");
obj.setColumnCount(10);
obj.setRowCount(100);
obj.setCellEditable(true);
var toolbar = new AW.HTML.DIV;
toolbar.setId("toolbar");
toolbar.setContent("mytoolbar", "<ul id='menu'><li>_File<ul><li>_Open</li><li>_Save</li></ul></li><ul>");
obj.defineTemplate("toolBar", toolbar);
var panel = new AW.Panels.Horizontal;
panel.changePanelHeight(25, "top");
obj.setLayoutTemplate(panel);
obj.setPanelTemplate(function(i){
switch(i){
case "top" : return this.getToolBarTemplate();
case "center": return this.getScrollTemplate();
case "bottom": return '';
}
});
document.write(obj);
</script>
</body>
</html>
// save the original method
obj.refresh1 = obj.refresh;
obj.refresh = function(){
obj.refresh1();
// Initialize the menus
DynarchMenu.setup('menu', { electric: 1000, timeout: 0 });
}
This topic is archived.