Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(6)  |  Derive(0)  |  Import(2)
Start or stop coloring the frame background
left & right are distances from the edge of the frame to start stop colouring.

src/r/e/reportlab-3.1.8/tests/test_platypus_pleaseturnover.py   reportlab(Download)
import unittest
from reportlab.platypus.flowables import Flowable, PTOContainer, KeepInFrame
from reportlab.platypus import FrameBG
from reportlab.lib.units import cm
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
            ]
        if fbg:
            fbg1 = [FrameBG(start=0,color=toColor('limegreen'))]
            fbg0 = [FrameBG(start=0)]
        else:

src/r/e/reportlab-3.1.8/tests/test_platypus_tables.py   reportlab(Download)
setOutDir(__name__)
import os,unittest
from reportlab.platypus import Spacer, SimpleDocTemplate, Table, TableStyle, FrameBG
from reportlab.platypus.paragraph import Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
    styBackground = ParagraphStyle('background', parent=styNormal, backColor=colors.pink)
    styH1 = styleSheet['Heading1']
    lst.append(FrameBG(color=colors.red))
    lst.append(Paragraph("First, a test of how tables align their content...", styH1))
    lst.append(Paragraph("""Generated with version %s""" % Version,
                         same font.  Hopefully now they are back on the same baseline""",
                        styNormal))
    lst.append(FrameBG(color=colors.blue))
    ts1 = TableStyle([
                ('ALIGN', (0,0), (-1,0), 'RIGHT'),
    t1.setStyle(ts1)
    lst.append(t1)
    lst.append(FrameBG(start=False))
    lst.append(Spacer(0,10))
    lst.append(Paragraph("Now we make a table with just one cell containing a string...note how the text sits low", styNormal))
    lst.append(FrameBG(start=False))