Table column.
| 312 | |
| 313 | |
| 314 | class _Column(Parented): |
| 315 | """Table column.""" |
| 316 | |
| 317 | def __init__(self, gridCol: CT_TblGridCol, parent: TableParent): |
| 318 | super(_Column, self).__init__(parent) |
| 319 | self._parent = parent |
| 320 | self._gridCol = gridCol |
| 321 | |
| 322 | @property |
| 323 | def cells(self) -> tuple[_Cell, ...]: |
| 324 | """Sequence of |_Cell| instances corresponding to cells in this column.""" |
| 325 | return tuple(self.table.column_cells(self._index)) |
| 326 | |
| 327 | @property |
| 328 | def table(self) -> Table: |
| 329 | """Reference to the |Table| object this column belongs to.""" |
| 330 | return self._parent.table |
| 331 | |
| 332 | @property |
| 333 | def width(self) -> Length | None: |
| 334 | """The width of this column in EMU, or |None| if no explicit width is set.""" |
| 335 | return self._gridCol.w |
| 336 | |
| 337 | @width.setter |
| 338 | def width(self, value: Length | None): |
| 339 | self._gridCol.w = value |
| 340 | |
| 341 | @property |
| 342 | def _index(self): |
| 343 | """Index of this column in its table, starting from zero.""" |
| 344 | return self._gridCol.gridCol_idx |
| 345 | |
| 346 | |
| 347 | class _Columns(Parented): |
no outgoing calls
searching dependent graphs…