[reportlab-users] using images as bullets

John Pywtorak jpywtora at calpoly.edu
Mon Aug 15 13:14:14 EDT 2005


Robin Becker wrote:
> Nicholas Wieland wrote:
> 
>>  - Britt Hibbert :
>>
>>>   Hi,
>>>
>>>   Does anyone have any experience using an image as a bullet when
>>>   bulleting a list  ( basically a list of Paragraph objects) ? If so,
>>>   any recommendations on simple methods of doing this would be greatly
>>>   appreciated.
>>
>>
>>  
>> Well, I've posted a ton of silly questions in the last few weeks on
>> RL, so
>> take my "advice" with a truckload of salt :p
>> I'd suggest to subclass the Paragraph flowable, adding an argument to
>> the initializer with the image you want to use.
>> Then in the draw method you can use your image as you like, adding extra
>> padding to the paragraph itself and drawinng the image where you like.
>> Never tryied with Paragraph, but this is usually what I try when I
>> want to
>> personalize a flowable.
>>
>> HTH,
>>   ngw
> 
> That's probably good advice. We don't currently have any way to embed
> non character boxes etc inside standard paragraphs.

Just a thought.  I needed this facility and went with a table with two
cells.  One cell has the bullet image and the other the Paragraph
flowable.  Also, if you do go the route of a custom flowable there is a
flowable Paragraph with an image to the right called ParagraphAndImage
in reportlab.platypus.flowables.

Johnny P
-- 
Windows
Start Here
Frustrating Hanging Crashing
Blue Screen of Death
Reboot



More information about the reportlab-users mailing list