PDFsharp & MigraDoc Foundation
http://forum.pdfsharp.de/

Row/Cell shading
http://forum.pdfsharp.de/viewtopic.php?f=2&t=2356
Page 1 of 1

Author:  ebrowne [ Thu Mar 07, 2013 4:53 pm ]
Post subject:  Row/Cell shading

I've got two tables I'm making for a PDF. They both have zebra strips (i.e., alternating row colors). They both have cells that wrap their text, which makes the cell larger than the other cells in that row. On one table, the larger cell is not an issue because all of the other cells on the row are completely filled with the shading. On the other table, the larger cell stands out like a sore thumb because the other, smaller cells aren't shaded like the larger.

For example, the table that works would have a row that looks like this (code block used for fixed width font):

One row
Code:
------- ----- --------
------- ----- --------


the other table has rows that look like this:

Code:
------ ----- ------
       -----


where the dashes represent shading and the spaces represent the edge of a cell. I would like for the other table rows to have all of their cells have even shading, instead of the staggered effect which is quite unsightly.

What am I missing to accomplish this?

Author:  Thomas Hoevel [ Mon Mar 11, 2013 9:32 am ]
Post subject:  Re: Row/Cell shading

I presume you set the shading of the cells. Set the shading of the row instead.

Author:  ebrowne [ Mon Mar 11, 2013 1:53 pm ]
Post subject:  Re: Row/Cell shading

Thomas,

Yes, I set the shading of the cells, but that was after setting the shading of the rows. I tried both methods, yet I'm still not getting the behavior desired. The table that works has cell shading, so I figured that would do it. On the second table (the one that doesn't work properly), I added borders to the cells and noticed plenty of space that wasn't being shaded.

The code to generate the two tables is very similar. I wouldn't expect such a difference in the outcome.

Thank you for your help!

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/