Grid size problem
Hi,
I'm still having this grid size problem.
Let's say I have 10rows (20px each) and 10cols (50px each).
If I fix Grid size as WxH=500x200, the grid will show both scrollbars.
If I artificially increase both dimensions by (let's say) 8px, than no scrollbars appear BUT bot footer row and leftmost fixed column appear as "detached" from the rest of the cell, causing a nasty visual effect (example: left border of last column and header's column separator not aligned).
Here I post the example code, showing two grids, the first with exact size, the last with artficially increased (by 8px) sizes:
Thanks in advance to anybody having the patience to have a look ... ;-)
Diabolik
I'm still having this grid size problem.
Let's say I have 10rows (20px each) and 10cols (50px each).
If I fix Grid size as WxH=500x200, the grid will show both scrollbars.
If I artificially increase both dimensions by (let's say) 8px, than no scrollbars appear BUT bot footer row and leftmost fixed column appear as "detached" from the rest of the cell, causing a nasty visual effect (example: left border of last column and header's column separator not aligned).
Here I post the example code, showing two grids, the first with exact size, the last with artficially increased (by 8px) sizes:
<html>
<head>
<title>Test Grid</title>
<link href="runtime/styles/xp/aw.css" rel="stylesheet"></link>
</head>
<body>
<script src="runtime/lib/aw.js"></script>
<style>
#myGrid { width: 1000px}
#myGrid .aw-grid-row {height: 20px; border-bottom: 1px solid #ccc; font-size:10px; font-family: "Verdana";}
#myGrid .aw-grid-row a{font-size:10px; color: blue; font-family: "Verdana"; text-decoration:underline;}
#myGrid .aw-grid-row a: visited{font-size:10px; color: blue; font-family: "Verdana"; text-decoration:underline;}
#myGrid .aw-alternate-even {background: #fff;}
#myGrid .aw-alternate-odd {background: #eee;}
#myGrid .aw-mouseover-row {background: #ccc;}
#myGrid .aw-mousedown-row {background: #999;}
#myGrid .aw-rows-selected {background: #316ac5; font-weight: bold;}
#myGrid .aw-column-0 {width: 100px; border-right: 1px solid #ccc; background: #ebeadb; text-align:center; color: blue; font-weight: bold;}
#myGrid .aw-column-1 {width: 100px; text-align:center;}
#myGrid .aw-column-2 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid .aw-column-3 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid .aw-column-4 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid .aw-column-5 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid .aw-column-6 {margin-left: 0px; margin-right: 0px; width: 100px; border-left: 1px solid #ccc; background: #ebeadb; text-align:center; color: blue; font-weight: bold;}
#myGrid .aw-grid-row .aw-cells-selected {background: #316ac5;}
#myGrid .aw-grid-headers {color: blue;font-weight: bold;}
#myGrid .aw-grid-footers {color: blue;font-weight: bold;}
#myGrid .aw-footer-0 {background: #ebeadb; border-top:2px solid #cbc7b8;}
</style>
<script>
var myData = [
["ROW1", "<a href=\"#\">1_1</a>", "1_2", "1_3", "1_4", "1_5", "TOT1"],
["ROW2", "2_1", "2_2", "2_3", "2_4", "2_5", "TOT2"],
["ROW3", "3_1", "3_2", "3_3", "3_4", "3_5", "TOT3"],
["ROW4", "4_1", "4_2", "4_3", "4_4", "4_5", "TOT4"]
]
var myHeaders = [
["Header", "COL1", "COL2", "COL3", "COL4", "COL5", "Footer"]
]
var myFooters = [
["Footers", "F_1", "F_2", "F_3", "F_4", "F_5", "F_TOT"]
]
var obj = new AW.Grid.Extended;obj.setId("myGrid");obj.setFixedLeft(1);
obj.setFixedRight(1);
obj.setControlSize(700, 120);
obj.setVirtualMode(false);
obj.setCellText(myData);
obj.setHeaderCount(1);
obj.setHeaderText(myHeaders);
obj.setHeaderHeight(20);
obj.setFooterHeight(20);
obj.setFooterVisible(true);
obj.setFooterText(myFooters);
obj.setFooterCount(1);
obj.setColumnCount(7);
obj.setRowCount(4);
obj.setSelectionMode("single-row");
document.write(obj);
</script>
<br><br>nRows=6, W=700, H=120<br><br>
<style>
#myGrid1 { width: 1000px}
#myGrid1 .aw-grid-row {height: 20px; border-bottom: 1px solid #ccc; font-size:10px; font-family: "Verdana";}
#myGrid1 .aw-grid-row a{font-size:10px; color: blue; font-family: "Verdana"; text-decoration:underline;}
#myGrid1 .aw-grid-row a: visited{font-size:10px; color: blue; font-family: "Verdana"; text-decoration:underline;}
#myGrid1 .aw-alternate-even {background: #fff;}
#myGrid1 .aw-alternate-odd {background: #eee;}
#myGrid1 .aw-mouseover-row {background: #ccc;}
#myGrid1 .aw-mousedown-row {background: #999;}
#myGrid1 .aw-rows-selected {background: #316ac5; font-weight: bold;}
#myGrid1 .aw-column-0 {width: 100px; border-right: 1px solid #ccc; background: #ebeadb; text-align:center; color: blue; font-weight: bold;}
#myGrid1 .aw-column-1 {width: 100px; text-align:center;}
#myGrid1 .aw-column-2 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid1 .aw-column-3 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid1 .aw-column-4 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid1 .aw-column-5 {width: 100px; text-align:center; border-left: 1px solid #ccc}
#myGrid1 .aw-column-6 {margin-left: 0px; margin-right: 0px; width: 100px; border-left: 1px solid #ccc; background: #ebeadb; text-align:center; color: blue; font-weight: bold;}
#myGrid1 .aw-grid-row .aw-cells-selected {background: #316ac5;}
#myGrid1 .aw-grid-headers {color: blue;font-weight: bold;}
#myGrid1 .aw-grid-footers {color: blue;font-weight: bold;}
#myGrid1 .aw-footer-0 {background: #ebeadb; border-top:2px solid #cbc7b8;}
</style>
<script>
var myData = [
["ROW1", "<a href=\"#\">1_1</a>", "1_2", "1_3", "1_4", "1_5", "TOT1"],
["ROW2", "2_1", "2_2", "2_3", "2_4", "2_5", "TOT2"],
["ROW3", "3_1", "3_2", "3_3", "3_4", "3_5", "TOT3"],
["ROW4", "4_1", "4_2", "4_3", "4_4", "4_5", "TOT4"]
]
var myHeaders = [
["Header", "COL1", "COL2", "COL3", "COL4", "COL5", "Footer"]
]
var myFooters = [
["Footers", "F_1", "F_2", "F_3", "F_4", "F_5", "F_TOT"]
]
var obj = new AW.Grid.Extended;obj.setId("myGrid1");obj.setFixedLeft(1);
obj.setFixedRight(1);
obj.setControlSize(708, 128);
obj.setVirtualMode(false);
obj.setCellText(myData);
obj.setHeaderCount(1);
obj.setHeaderText(myHeaders);
obj.setHeaderHeight(20);
obj.setFooterHeight(20);
obj.setFooterVisible(true);
obj.setFooterText(myFooters);
obj.setFooterCount(1);
obj.setColumnCount(7);
obj.setRowCount(4);
obj.setSelectionMode("single-row");
document.write(obj);
</script>
<br><br>nRows=6, W=708, H=128<br><br>
</body>
</html>
Thanks in advance to anybody having the patience to have a look ... ;-)
Diabolik
Diabolik
January 25,