本文整理匯總了Python中gramps.gen.plug.docgen.TableCellStyle.set_longlist方法的典型用法代碼示例。如果您正苦於以下問題:Python TableCellStyle.set_longlist方法的具體用法?Python TableCellStyle.set_longlist怎麽用?Python TableCellStyle.set_longlist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類gramps.gen.plug.docgen.TableCellStyle
的用法示例。
在下文中一共展示了TableCellStyle.set_longlist方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: make_default_style
# 需要導入模塊: from gramps.gen.plug.docgen import TableCellStyle [as 別名]
# 或者: from gramps.gen.plug.docgen.TableCellStyle import set_longlist [as 別名]
#.........這裏部分代碼省略.........
font.set_italic(1)
para = ParagraphStyle()
para.set_font(font)
para.set_top_margin(ReportUtils.pt2cm(3))
para.set_bottom_margin(ReportUtils.pt2cm(3))
para.set_description(_('The style used for the section headers.'))
default_style.add_paragraph_style("IDS-Section", para)
font = FontStyle()
font.set_size(8)
para = ParagraphStyle()
para.set_alignment(PARA_ALIGN_RIGHT)
para.set_font(font)
para.set_top_margin(ReportUtils.pt2cm(3))
para.set_bottom_margin(ReportUtils.pt2cm(3))
para.set_description(_('A style used for image facts.'))
default_style.add_paragraph_style("IDS-ImageNote", para)
font = FontStyle()
font.set_size(8)
para = ParagraphStyle()
para.set_alignment(PARA_ALIGN_CENTER)
para.set_font(font)
para.set_top_margin(ReportUtils.pt2cm(3))
para.set_bottom_margin(ReportUtils.pt2cm(3))
para.set_description(_('A style used for image captions.'))
default_style.add_paragraph_style("IDS-ImageCaptionCenter", para)
# Table Styles
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0, 20)
tbl.set_column_width(1, 80)
default_style.add_table_style("IDS-IndTable", tbl)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0, 50)
tbl.set_column_width(1, 50)
default_style.add_table_style("IDS-ParentsTable", tbl)
cell = TableCellStyle()
cell.set_top_border(1)
cell.set_bottom_border(1)
default_style.add_cell_style("IDS-TableHead", cell)
cell = TableCellStyle()
default_style.add_cell_style("IDS-NormalCell", cell)
cell = TableCellStyle()
cell.set_longlist(1)
default_style.add_cell_style("IDS-ListCell", cell)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(3)
tbl.set_column_width(0,20)
tbl.set_column_width(1,50)
tbl.set_column_width(2,30)
default_style.add_table_style('IDS-PersonTable', tbl)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(2)
tbl.set_column_width(0,20)
tbl.set_column_width(1,80)
default_style.add_table_style('IDS-PersonTable2', tbl)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(5)
tbl.set_column_width(0,22) # Type
tbl.set_column_width(1,22) # Date
tbl.set_column_width(2,16) # Status
tbl.set_column_width(3,22) # Temple
tbl.set_column_width(4,18) # Place
default_style.add_table_style('IDS-OrdinanceTable', tbl)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(6)
tbl.set_column_width(0,20) # empty
tbl.set_column_width(1,18) # Type
tbl.set_column_width(2,18) # Date
tbl.set_column_width(3,14) # Status
tbl.set_column_width(4,18) # Temple
tbl.set_column_width(5,12) # Place
default_style.add_table_style('IDS-OrdinanceTable2', tbl)
tbl = TableStyle()
tbl.set_width(100)
tbl.set_columns(3)
tbl.set_column_width(0, 33)
tbl.set_column_width(1, 33)
tbl.set_column_width(2, 34)
default_style.add_table_style("IDS-GalleryTable", tbl)
Endnotes.add_endnote_styles(default_style)