borders not set right on grid cell [message #1164640] |
Thu, 31 October 2013 20:42  |
Gibran Shah Messages: 33 Registered: September 2013 |
Member |
|
|
Hello,
I'm trying to create a grid manually in the beforeFactory script. I'm having a bit of an issue with the cell borders. Here's my script:
var elementFactory = reportContext.getDesignHandle().getElementFactory();
var newGrid = elementFactory.newGridItem("NewGrid", 1, 1);
newGrid.setProperty("marginTop", "100px");
newGrid.setProperty("marginLeft", "1px");
var cell1 = newGrid.getCell(1, 1);
setBorders(cell1);
var newLabel1 = elementFactory.newLabel("label1");
newLabel1.setText("label1");
cell1.getContent().add(newLabel1);
reportContext.getDesignHandle().getBody().add(newGrid);
function setBorders(cell)
{
cell.setProperty("borderBottomStyle", "solid");
cell.setProperty("borderBottomWidth", "1px");
cell.setProperty("borderBottomColor", "#000000");
cell.setProperty("borderLeftStyle", "solid");
cell.setProperty("borderLeftWidth", "1px");
cell.setProperty("borderLeftColor", "#000000");
cell.setProperty("borderRightStyle", "solid");
cell.setProperty("borderRightWidth", "1px");
cell.setProperty("borderRightColor", "#000000");
cell.setProperty("borderTopStyle", "solid");
cell.setProperty("borderTopWidth", "1px");
cell.setProperty("borderTopColor", "#000000");
}
The setBorders function would seem to set a 1px border on all sides of the cell but as you can see from the screen capture below, it doesn't:

Has anyone seen this before? What's happening here?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02162 seconds