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

Method virtual_region

src/textual/widget.py:2321–2334  ·  view source on GitHub ↗

The widget region relative to its container (which may not be visible, depending on scroll offset). Returns: The virtual region.

(self)

Source from the content-addressed store, hash-verified

2319
2320 @property
2321 def virtual_region(self) -> Region:
2322 """The widget region relative to its container (which may not be visible,
2323 depending on scroll offset).
2324
2325
2326 Returns:
2327 The virtual region.
2328 """
2329 try:
2330 return self.screen.find_widget(self).virtual_region
2331 except NoScreen:
2332 return Region()
2333 except errors.NoWidget:
2334 return Region()
2335
2336 @property
2337 def window_region(self) -> Region:

Callers

nothing calls this directly

Calls 2

RegionClass · 0.90
find_widgetMethod · 0.45

Tested by

no test coverage detected