[reportlab-users] Box with title and content portions having different background colors

Roberto Alsina ralsina at netmanagers.com.ar
Tue Jun 23 18:45:23 EDT 2009


On Tuesday 23 June 2009 19:24:29 Benjamin Higgins wrote:

> Hi all,

>

> I've been trying to create a box that looks like this:

>

> +----------------+

>

> | Title |

> |+--------------+|

> |

> || Content ||

> |

> |+--------------+|

>

> +----------------+

>

> I want the content area background to be white, and containing background

> gray.

>

> My first attempt was to use a 3x3 table. This worked almost perfectly, but

> when the content is bigger than a page I get a LayoutError Flowable "too

> large" exception. From reading the archives, I gather that table cells

> aren't able to be larger than a page.

>

> I'm now trying to find some other way to accomplish this design.

>

> Any tips?


How about just drawing the grey background and white boxes in beforePage?

--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)
"Our opponent is an alien starship packed with atomic bombs, I said.
We have a protractor. Okay, I’ll go home and see if I can scrounge up a
ruler and a piece of string." — Neal Stephenson


More information about the reportlab-users mailing list