ListItemBlock
ภาพรวม
ListItemBlock เป็นคลาสใน Aspose.Words FOSS สำหรับ Python. สืบทอดจาก: Block.
คลาสนี้ให้ 6 เมธอดสำหรับทำงานกับอ็อบเจ็กต์ ListItemBlock ในโปรแกรม Python. เมธอดที่มีให้รวมถึง: __init__, add_child, get_level, get_list_container, get_parent. สมาชิกสาธารณะทั้งหมดสามารถเข้าถึงได้จากแอปพลิเคชัน Python ใดก็ได้หลังจากติดตั้งแพ็กเกจ Aspose.Words FOSS สำหรับ Python. คุณสมบัติ: block_level, children, is_first_child, is_last_child, is_level_start, marker, และอีก 5 รายการ.
คุณสมบัติ
| ชื่อ | ประเภท | การเข้าถึง | คำอธิบาย |
|---|---|---|---|
marker | `` | อ่าน | รับเครื่องหมาย. |
start_at | `` | อ่าน | รับค่า start at. |
is_level_start | `` | อ่าน | รับค่า is level start. |
is_first_child | bool | อ่าน | รับค่า is first child. |
is_last_child | bool | อ่าน | ดึงค่า is last child. |
next_sibling | Optional["Block"] | อ่าน | รับพี่น้องถัดไป. |
previous_sibling | Optional["Block"] | อ่าน | รับพี่น้องก่อนหน้า. |
block_level | MarkdownBlockLevel | อ่าน | รับระดับบล็อก. |
type | `` | อ่าน | รับประเภท. |
parent | Optional["Block"] | อ่าน | รับพาเรนท์. |
children | list["Block"] | อ่าน | รับค่า children. |
วิธีการ
| ลายเซ็น | คำอธิบาย |
|---|---|
__init__(block_type: BlockType, marker: ListMarker, start_at: int) | Calls init(block_type, เครื่องหมาย, start_at) บนอินสแตนซ์ ListItemBlock นี้. |
get_level() → int | ความลึกการซ้อนแบบ 0-based: มีรายการพาเรนต์กี่รายการที่ล้อมรอบรายการนี้. |
get_list_container() → Optional["ListBlock"] | คืนค่าตัวคอนเทนเนอร์ของรายการ. |
__init__(block_type: BlockType) | Calls init(block_type) บนอินสแตนซ์ ListItemBlock นี้. |
add_child(child: "Block") → "Block" | เรียก add_child(child) บนอินสแตนซ์ ListItemBlock นี้. |
get_parent() → Optional["Block"] | เดินขึ้นตามโซ่บรรพบุรุษและคืนบล็อกแรกที่ |
``type`` is one of *types*, or ``None`` if none matches. |