Paragraph

ภาพรวม

Paragraph เป็นคลาสใน Aspose.Words FOSS สำหรับ Python. สืบทอดจาก: BaseModel, NodeCastMixin.

ย่อหน้าซึ่งมีลูก — Run, BookmarkStart / BookmarkEnd,

``FieldStart`` / ``FieldSeparator`` / ``FieldEnd`` and inline ``Shape`` —

sit in a single ordered collection in document order.

คลาสนี้ให้ 10 เมธอดสำหรับทำงานกับอ็อบเจ็กต์ Paragraph ในโปรแกรม Python. เมธอดที่มี ได้แก่: as_body, as_cell, as_paragraph, as_row, as_run, as_section, as_shape, as_table, get_child_nodes, get_text. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้จากแอปพลิเคชัน Python ใด ๆ หลังจากติดตั้งแพ็กเกจ Aspose.Words FOSS สำหรับ Python. คุณสมบัติ: frame_format, list_format, list_label, paragraph_break_font, paragraph_format, runs, และอีก 2 รายการ.

คุณสมบัติ

ชื่อประเภทการเข้าถึงคำอธิบาย
textstrอ่านข้อความที่ต่อเนื่องของลูกทั้งหมดของ Run.
runslist[Run]อ่านมุมมองแบบพิมพ์ของลูก Run ของย่อหน้าในเอกสาร
    order. |

| paragraph_break_font | Optional[Font] | อ่าน/เขียน | Aspose.Words เปิดเผยสิ่งนี้บน Paragraph; ที่เก็บอยู่บน |

    ``ParagraphFormat`` for style-chain merging. |

| frame_format | Optional["FrameFormat"] | อ่าน | Aspose.Words เปิดเผยสิ่งนี้บน Paragraph; ที่เก็บอยู่บน |

    ``ParagraphFormat`` for style-chain merging. |

| type | Literal["Paragraph"] | อ่าน | รับประเภท. | | paragraph_format | ParagraphFormat | อ่าน | รับรูปแบบย่อหน้า. | | list_format | ListFormat \| None | อ่าน | รับรูปแบบรายการ. | | list_label | Optional[ListLabel] | อ่าน | รับป้ายกำกับรายการ. |

วิธีการ

ลายเซ็นคำอธิบาย
get_text() → strข้อความพร้อมเครื่องหมายย่อหน้า ตามที่ aspose.words คืนค่า.
get_child_nodes(node_type: int, deep: bool) → listโหนดลูก, สามารถกรองโดย :class:NodeType ได้ตามต้องการ.
as_body()เรียก as_body บนอินสแตนซ์ Paragraph นี้.
as_cell()เรียก as_cell บนอินสแตนซ์ Paragraph นี้.
as_paragraph()เรียก as_paragraph บนอินสแตนซ์ Paragraph นี้.
as_row()เรียก as_row บนอินสแตนซ์ Paragraph นี้.
as_run()เรียก as_run บนอินสแตนซ์ Paragraph นี้.
as_section()เรียก as_section บนอินสแตนซ์ Paragraph นี้.
as_shape()เรียก as_shape บนอินสแตนซ์ Paragraph นี้.
as_table()เรียก as_table บนอินสแตนซ์ Paragraph นี้.

ดูเพิ่มเติม

 ภาษาไทย