Is it possible to style a table with rows having alternating background colours? #363
-
Perhaps a picture is worth 1000 words: so as in https://datatables.net/examples/data_sources/dom.html I find it much easier to visually "track" rows with that alternating background colour-scheme. My initial attempt to do this kinda works but is not as beautiful as I might have hoped (i.e. the cells get alternating colours but the inter-cell spaces don't) The above pic was generated by this: bg = Style(bgcolor="rgb(40,40,40)")
table = Table(box=box.SIMPLE_HEAD, row_styles=["none", bg]) Oh and thanks for this awesome lib! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Not currently, unless you were to set Its not quite what you are looking for, but you can set I'll look in to extending the background color across the box lines in the next release. |
Beta Was this translation helpful? Give feedback.
Not currently, unless you were to set
box=None
Its not quite what you are looking for, but you can set
row_styles=['dim', '']
which will display a similar affect.I'll look in to extending the background color across the box lines in the next release.