<html>
<head>
<script src="activewidgets/runtime/lib/aw.js"></script>
<link href="activewidgets/runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<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");
var inp = new AW.UI.Input;
inp.setControlText("a");
toolbar.setContent("input", inp);
obj.defineTemplate("bottomLine", toolbar);
obj.setLayoutTemplate(new AW.Panels.Horizontal);
obj.setPanelTemplate(function(i){
switch(i){
case 1: return this.getScrollTemplate();
case 2: return this.getBottomLineTemplate();
}
});
obj.setPanelHeight(23, 2); //bottom line
document.write(obj);
</script>
</body>
</html>
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");
var inp = new AW.UI.Input;
inp.setControlText("a");
inp.onControlActivated = function(){
obj.setCellEditable(false);
}
inp.onControlDeactivated = function(){
obj.setCellEditable(true);
}
toolbar.setContent("input", function(){return inp});
//toolbar.setContent("input", inp);
obj.defineTemplate("bottomLine", toolbar);
obj.setLayoutTemplate(new AW.Panels.Horizontal);
obj.setPanelTemplate(function(i){
switch(i){
case 1: return this.getScrollTemplate();
case 2: return this.getBottomLineTemplate();
}
});
obj.setPanelHeight(23, 2); //bottom line
document.write(obj);
This topic is archived.