MCPcopy
hub / github.com/Textualize/textual / get_render_width

Method get_render_width

src/textual/widgets/_data_table.py:237–248  ·  view source on GitHub ↗

Width, in cells, required to render the column with padding included. Args: data_table: The data table where the column will be rendered. Returns: The width, in cells, required to render the column with padding included.

(self, data_table: DataTable[Any])

Source from the content-addressed store, hash-verified

235 auto_width: bool = False
236
237 def get_render_width(self, data_table: DataTable[Any]) -> int:
238 """Width, in cells, required to render the column with padding included.
239
240 Args:
241 data_table: The data table where the column will be rendered.
242
243 Returns:
244 The width, in cells, required to render the column with padding included.
245 """
246 return 2 * data_table.cell_padding + (
247 self.content_width if self.auto_width else self.width
248 )
249
250
251@dataclass

Callers 12

watch_show_row_labelsMethod · 0.80
_update_dimensionsMethod · 0.80
_get_cell_regionMethod · 0.80
_get_row_regionMethod · 0.80
_get_column_regionMethod · 0.80
_render_line_in_rowMethod · 0.80
_render_lineMethod · 0.80
_get_fixed_offsetMethod · 0.80

Calls

no outgoing calls