tabstops
tabstops
¶
Tabstop-related proxy types.
TabStops
¶
Bases: ElementProxy
A sequence of TabStop objects providing access to the tab stops of a paragraph or paragraph style.
Supports iteration, indexed access, del, and len(). It is accesed using the tab_stops property of ParagraphFormat; it is not intended to be constructed directly.
Source code in src/docx/text/tabstops.py
add_tab_stop
¶
Add a new tab stop at position, a Length object specifying the location
of the tab stop relative to the paragraph edge.
A negative position value is valid and appears in hanging indentation. Tab
alignment defaults to left, but may be specified by passing a member of the
WdTabAlignment enumeration as alignment. An optional leader character
can be specified by passing a member of the WdTabLeader enumeration as
leader.
Source code in src/docx/text/tabstops.py
TabStop
¶
Bases: ElementProxy
An individual tab stop applying to a paragraph or style.
Accessed using list semantics on its containing TabStops object.
Source code in src/docx/text/tabstops.py
alignment
property
writable
¶
A member of WdTabAlignment specifying the alignment setting for this tab stop.
Read/write.
leader
property
writable
¶
A member of WdTabLeader specifying a repeating character used as a "leader", filling in the space spanned by this tab.
Assigning None produces the same result as assigning WD_TAB_LEADER.SPACES.
Read/write.