hi can anybody plz help in converting text in bold and making it center aligned.
On Tuesday, November 13, 2012 at 7:53:38 AM UTC-6, piero crisci wrote: > > I am using pytrf for create a document. > I want to make the Heading font with a particular kind of colour, but i > cannot manage to change the color of the font. > I manage to use only the standard colour in the StyleSheet. > > Here is the code implemented: > def render_doc(): > import gluon.contrib.pyrtf as q > doc.Sections.append(section) > section=q.Section(break_type=q.Section.PAGE, first_page_number=1) > ss=q.StyleSheet() > ss.Colours.accepted_type = True > ss.Colours.append(q.Colour('Equi',250,255,0)) > para_ps = q.ParagraphPropertySet() > para_ps.SetAlignment(3) > p = q.Paragraph(para_ps) > text_ps_heading = q.TextPropertySet(size=38,bold=True) > * text_ps_heading.SetColour(ss.Colours.Equi) * > text_heading = q.Text('\par HEADING \par' ,text_ps_heading) > p.append(text_heading) > section.append(p) > response.headers['Content-Type']='text/rtf' > return q.dumps(doc) > > > The text_heading rendering appear BLACK > > Instead if i change : > > *text_ps_heading.SetColour(ss.Colours.Equi) *Into > > *text_ps_heading.SetColour(ss.Colours.Red) * > The text_heading rendering appear RED > Is like ss.Colours don't take the new colour CLASS. > Am i wrong? > How i could set a new colour in the ss.Colours? > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.