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

Method set

src/textual/css/query.py:481–508  ·  view source on GitHub ↗

Sets common attributes on matched nodes. Args: display: Set `display` attribute on nodes, or `None` for no change. visible: Set `visible` attribute on nodes, or `None` for no change. disabled: Set `disabled` attribute on nodes, or `None` for no change.

(
        self,
        display: bool | None = None,
        visible: bool | None = None,
        disabled: bool | None = None,
        loading: bool | None = None,
    )

Source from the content-addressed store, hash-verified

479 return self
480
481 def set(
482 self,
483 display: bool | None = None,
484 visible: bool | None = None,
485 disabled: bool | None = None,
486 loading: bool | None = None,
487 ) -> DOMQuery[QueryType]:
488 """Sets common attributes on matched nodes.
489
490 Args:
491 display: Set `display` attribute on nodes, or `None` for no change.
492 visible: Set `visible` attribute on nodes, or `None` for no change.
493 disabled: Set `disabled` attribute on nodes, or `None` for no change.
494 loading: Set `loading` attribute on nodes, or `None` for no change.
495
496 Returns:
497 Query for chaining.
498 """
499 for node in self:
500 if display is not None:
501 node.display = display
502 if visible is not None:
503 node.visible = visible
504 if disabled is not None:
505 node.disabled = disabled
506 if loading is not None:
507 node.loading = loading
508 return self

Callers 7

closeMethod · 0.45
disable_inputMethod · 0.45
disable_inputMethod · 0.45
disable_inputMethod · 0.45
closeMethod · 0.45
stop_application_modeMethod · 0.45
writeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected