Re: reportlab and listflowable

PB <[email protected]>
Newsgroups gmane.comp.python.reportlab.user
Message-ID <[email protected]>
W dniu 20.01.2014 12:48, Robin Becker pisze:
> On 19/01/2014 18:11, PB wrote:
>> Hi,
>>
>> I'm new here. My case is that i don't want the 5) item. The same problem
>> is in example: www.reportlab.com/docs/reportlab-userguide.pdf‎ page 86.
>> Can i fix it? Any idea where i should do that?
>>
>> BR
> ...
> sorry, but I don't understand what you are asking. Please try again if 
> necessary you can use ascii to indicate what you want eg
>
> items
> 1) aaaa
> 2) bbbb
> 4) dddd
>
> etc etc if you are having trouble describing exactly what you need to 
> ask.

Thank you for your answer. This is my development of the topic.

The example code:
|from reportlab.platypus import ListFlowable, ListItem||
||from reportlab.lib.styles import getSampleStyleSheet||
||styles = getSampleStyleSheet()||
||style = styles["Normal"]||
||
t = ListFlowable(||
||    [||
||        Paragraph("Item no.1", style),||
||        ListItem(Paragraph("Item no. 2", 
style),bulletColor="green",value=7),||
||        ListFlowable(||||
             [||
||                Paragraph("sublist item 1", style),||
||                ListItem(Paragraph('sublist item 2', 
style),bulletColor='red',value='square')||
||                ],||
||            bulletType='bullet',||
||            start='square',||
||        ),||
||        Paragraph("Item no.4", style),||
||        ],||
||    bulletType='i'||
||    )


|This is output:|
|
i Item no.1
vii Item no. 2
viii ■ sublist item 1
      ■ sublist item 2
ix Item no.4

But the proper output is this in my opinion:

i Item no.1
vii Item no. 2
      ■ sublist item 1
      ■ sublist item 2
viii Item no.4

So the item (|ListFlowable with sublist|) can not be numbered.

Thanks in advance!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.