MCPcopy Create free account
hub / github.com/scanny/python-pptx / _set_marX

Method _set_marX

src/pptx/oxml/table.py:351–360  ·  view source on GitHub ↗

Set value of marX attribute on `a:tcPr` child element. If `marX` is |None|, the marX attribute is removed. `marX` is a string, one of `('marL', 'marR', 'marT', 'marB')`.

(self, marX: str, value: Length | None)

Source from the content-addressed store, hash-verified

349 return CT_TextBody.new_a_txBody()
350
351 def _set_marX(self, marX: str, value: Length | None) -> None:
352 """Set value of marX attribute on `a:tcPr` child element.
353
354 If `marX` is |None|, the marX attribute is removed. `marX` is a string, one of `('marL',
355 'marR', 'marT', 'marB')`.
356 """
357 if value is None and self.tcPr is None:
358 return
359 tcPr = self.get_or_add_tcPr()
360 setattr(tcPr, marX, value)
361
362
363class CT_TableCellProperties(BaseOxmlElement):

Callers 4

marTMethod · 0.95
marRMethod · 0.95
marBMethod · 0.95
marLMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected