getTemplate("DGrid").setSelectorWidth(45);
<html>
<head>
<script src="../../runtime/lib/aw.js"></script>
<link href="../../runtime/styles/xp/aw.css" rel="stylesheet" />
</head>
<body>
<script>
a = new AW.UI.Grid;
var myHeader = ["Number","Description"];
var myData = [
["1","Description 1"],
["2","Description 2"],
["3","Description 3"],
["4","Description 4"],
["5","Description 5"],
["6","Description 6"],
["7","Description 7"],
["8","Description 8"],
["9","Description 9"],
["10","Description 10"],
["11","Description 11"],
["12","Description 12"],
["13","Description 13"],
["14","Description 14"],
["15","Description 15"]
];
AW.UI.myDispatch = AW.System.Control.subclass();
AW.UI.myDispatch.create = function()
{
var obj = this.prototype;
with (obj)
{
setStyle("height", 500);
//setStyle("width", 700);
setStyle("position", "absolute");
}
obj.defineTemplate("Header", new AW.HTML.DIV);
with (obj.getTemplate("Header"))
{
setStyle("width", "100%");
setStyle("height", 30);
setStyle("background", "lightblue");
}
obj.defineTemplate("AuxUDV", new AW.HTML.DIV);
with (obj.getTemplate("AuxUDV"))
{
setStyle("height", 30);
setStyle("background", "lightyellow");
setStyle("width", "100%");
}
obj.defineTemplate("NavBar", new AW.HTML.DIV);
with (obj.getTemplate("NavBar"))
{
setStyle("width", "100%");
setStyle("height", 30);
setStyle("background", "lightgreen");
}
obj.defineTemplate("TheGrid", new AW.UI.Grid)
with (obj.getTemplate("TheGrid"))
{
setStyle("height", 200);
setStyle("width", "100%");
setCellText(myData);
setRowCount(myData.length);
setHeaderText("Header");
setColumnCount(2);
setSelectorVisible(true);
//setSelectorWidth(75); // <- remove this line and test in IE
}
obj.setContent("html", function(){
return this.getHeaderTemplate() +
this.getAuxUDVTemplate() +
this.getNavBarTemplate() +
this.getTheGridTemplate();
})
}
a = new AW.UI.myDispatch;
a.setStyle("width", 600);
a.setId("WWW");
document.write(a);
</script>
</body>
</html>
This topic is archived.