I have a table created this way.
Table table = new Table(columnNames.Length);
table.SetWidth(new UnitValue(UnitValue.PERCENT, 100));
table.SetBorder(new SolidBorder(ColorConstants.LIGHT_GRAY, 1));
The problem is that SetBorder call only sets external borders of table, not inner borders.
I cannot set border to cells, since cells have margins, so borders appear inside each table cell, so I think there is other way to set that border. It is solid black by default. I need to change it to solid light gray.
EDIT:
This is what I actually get when setting border for the table and for the cells together. I need the solid black borders to be light gray. Cell border is not the solution since cells have margins, as you see.
Related
just figure out that the Table needs a TableBorder which takes Color only and controls the boundary and interior divisions (horizontalInside....) of the table.
The idea is how can we make a divider with a "gradient" effect, can we actually do this?
I've created a UITableViewCell with a textfield in it, which has a large diffused shadow underneath it. I've also set it up so that these big shadows can blend under its surrounding cells.
NB. Shadow has been HEAVILY emphasised here to show the problem.
The problem is that I want the shadow from my EMAIL textfield to blend underneath the password cell. i.e. I want both textfields to have a white background, but underneath them both I have the shadow. Something like this:
The reason this is a problem is because the UITableView is being rendered with upper cells "above" the lower ones. So any shadow from the cell at row 1 will bleed on top of the cells in rows 2, 3, 4 etc.
I was wondering if perhaps there is a way to change this rendering, and instead reverse the rendering so that a cell in row 4 is actually ABOVE rows 3, 2 and 1.
Or perhaps there is a way of setting the Password textfield so that no shadows are rendered on top of it?
Any help, very much appreciated!
Thanks to #Amr for pointing me in the direction of the cell.layer.zPosition.
The higher the value this is, the "closer" to the viewer the layer sits, so as long as each row has a higher value, it will appear "above" the shadows from any cells around it.
Since I use multiple sections in my code, I used this line to assign each cell above the previous one.
cell.layer.zPosition = CGFloat(indexPath.section) * 1000 + CGFloat(indexPath.row)
I'm trying to layout some text that is being exported as a PDF.
I'm using drawInRect(rect, withAttributes) to draw the strings, however, I'm getting a gap between the top of the rectangle the text is being drawn in, and the actual text.
Here's a screenshot, with the bounding rects stroke in red
the goal is to have the 2 "1." be top aligned, but because of that gap I can't figure out how to do that...
Thanks!
This is my report.
Above row contains a parent row group and a child row group.
I have done border formatting of the report . I simply right click each Text box and gives border accordingly. But, I am not able to set border for entire Group. In group properties there is no option for Border. I do not want any border between the rows of a group. How I can do that?
Go inside the textboxes you want to remove the borders and remove the top and bottom border.
When the group expands, you will see the bottom border of the first textbox outside the group in the top and the top border of the first textbox outside the group below it. (but in between cells from the same group, there will be no borders)
If you only want to set the border to the Row header you shouldn't use the border property of the Row detail.
The reason you wont see the changes on the bottom row header is because it overlaps with the top border of the row details.
A good way to work around it is as follows :
you can set the color and border width of all three sides(Top, Left, Right) of the row header and see the change in the preview. However, even after you change the color of the bottom border value you wont see the change until you start scrolling down. IN most cases the visibility is not good even oenter image description heren the printed version of the report.
solution : change the border width of the bottom border width property to be greater than the default or the detail top border width property.
caution : if you change the top border property of the detail columns it will repeat through out the details.
eg.
Row header border property :
Border color Black
Border width 1pt, , , , 2pt
Row detail border Property :
Border color LightGrey
Border width 1pt
I need to have a border line for the PdfPTable but not for the cells inside. Can anyone tell me how to do it?
I have done this by putting this table inside a new cell. Now my question is how to add a line to split the rows?
In iText each PdfPCell has its own borders.
You can set the borders needed on the cell, and in case of a nested table do the same for that tables cells.
In your case you probably want to set the bottom border on the entire row that is to be separated.